kripken/emscripten — Issue #100: ios not compiling with last version of LLVM
Author: BenoitT
Created: 2011-10-19 20:40:18+00:00
State: open

ios is not compiling for me. It thinks you need ( and ) so he thinks you forgot a ). See the output message for more clarity.

You can get the same errors by using boost::smart_ptr.

I'm using:
Windows 7 (no Cygwin or anything)
LLVM 3.0
EMScripten 3.0.46

Output
=========
3>emmaken.py: C:/webcompiler/External/EMScripten/tools/emmaken.py C:/Icewave/test/TestGame/src/TestGame.cpp -D_HAVE_STDC -DBOOST_DISABLE_THREADS -DNO_THREADING_DEFINED -U_MSC_EXTENSIONS -U_MSC_VER -DWEBGL -U_WIN32 -o C:/test.by -IC:/Icewave/test/TestGame/build/windows -Ic:/icewave/build/windows -Ic:/icewave/src -Ic:/icewave/src/core -IC:/icewavelibs/src -IC:/icewavelibs/build/windows -IC:/icewavelibs/src
3>Running: C:/webcompiler/WebCompiler/bin/Debug/bin/LLVM\clang++ C:/Icewave/test/TestGame/src/TestGame.cpp -D_HAVE_STDC -DBOOST_DISABLE_THREADS -DNO_THREADING_DEFINED -U_MSC_EXTENSIONS -U_MSC_VER -DWEBGL -U_WIN32 -o C:/test.by -IC:/Icewave/test/TestGame/build/windows -Ic:/icewave/build/windows -Ic:/icewave/src -Ic:/icewave/src/core -IC:/icewavelibs/src -IC:/icewavelibs/build/windows -IC:/icewavelibs/src -m32 -U__i386__ -U__x86_64__ -U__i386 -U__x86_64 -U__SSE__ -U__SSE2__ -U__MMX__ -UX87_DOUBLE_ROUNDING -UHAVE_GCC_ASM_FOR_X87 -DEMSCRIPTEN -U__STRICT_ANSI__ -nostdinc -IC:\webcompiler\External\EMScripten\system\include -IC:\webcompiler\External\EMScripten\system\include\bsd -IC:\webcompiler\External\EMScripten\system\include\libc -IC:\webcompiler\External\EMScripten\system\include\libcxx -IC:\webcompiler\External\EMScripten\system\include\gfx -IC:\webcompiler\External\EMScripten\system\include\net -IC:\webcompiler\External\EMScripten\system\include\SDL -emit-llvm -c
3>In file included from C:/Icewave/test/TestGame/src/TestGame.cpp:1:
3>In file included from c:/icewave/src/core\IceWave.h:113:
3>In file included from C:\webcompiler\External\EMScripten\system\include\libcxx\string:430:
3>In file included from C:\webcompiler\External\EMScripten\system\include\libcxx\iosfwd:90:
3>In file included from C:\webcompiler\External\EMScripten\system\include\libc\wchar.h:4:
3>C:\webcompiler\External\EMScripten\system\include\libc\_ansi.h:107:9: warning: '_ATTRIBUTE' macro redefined
3>#define _ATTRIBUTE(attrs) __attribute__ (attrs)
3> ^
3>C:\webcompiler\External\EMScripten\system\include\libcxx\__config:125:11: note: previous definition is here
3># define _ATTRIBUTE(x) __attribute__ ((x))
3> ^
3>In file included from C:/Icewave/test/TestGame/src/TestGame.cpp:1:
3>In file included from c:/icewave/src/core\IceWave.h:137:
3>In file included from C:/icewavelibs/src\boost/smart_ptr.hpp:19:
3>In file included from C:/icewavelibs/src\boost/scoped_ptr.hpp:14:
3>In file included from C:/icewavelibs/src\boost/smart_ptr/scoped_ptr.hpp:14:
3>In file included from C:/icewavelibs/src\boost/assert.hpp:82:
3>In file included from C:\webcompiler\External\EMScripten\system\include\libcxx\iostream:38:
3>In file included from C:\webcompiler\External\EMScripten\system\include\libcxx\ios:216:
3>In file included from C:\webcompiler\External\EMScripten\system\include\libcxx\__locale:20:
3>In file included from C:\webcompiler\External\EMScripten\system\include\libcxx\mutex:176:
3>In file included from C:\webcompiler\External\EMScripten\system\include\libcxx\__mutex_base:17:
3>In file included from C:\webcompiler\External\EMScripten\system\include\libc\pthread.h:28:
3>In file included from C:\webcompiler\External\EMScripten\system\include\libc\unistd.h:4:
3>C:\webcompiler\External\EMScripten\system\include\libc\sys/unistd.h:410:9: warning: '_SC_SHARED_MEMORY_OBJECTS' macro redefined
3>#define _SC_SHARED_MEMORY_OBJECTS 199
3> ^
3>C:\webcompiler\External\EMScripten\system\include\libc\sys/unistd.h:305:9: note: previous definition is here
3>#define _SC_SHARED_MEMORY_OBJECTS 31
3> ^
3>In file included from C:/Icewave/test/TestGame/src/TestGame.cpp:1:
3>In file included from c:/icewave/src/core\IceWave.h:137:
3>In file included from C:/icewavelibs/src\boost/smart_ptr.hpp:19:
3>In file included from C:/icewavelibs/src\boost/scoped_ptr.hpp:14:
3>In file included from C:/icewavelibs/src\boost/smart_ptr/scoped_ptr.hpp:14:
3>In file included from C:/icewavelibs/src\boost/assert.hpp:82:
3>In file included from C:\webcompiler\External\EMScripten\system\include\libcxx\iostream:38:
3>C:\webcompiler\External\EMScripten\system\include\libcxx\ios:319:55: error: expected ')'
3> _LIBCPP_INLINE_VISIBILITY void exceptions(iostate __except);
3> ^
3>C:\webcompiler\External\EMScripten\system\include\libcxx\ios:319:46: note: to match this '('
3> _LIBCPP_INLINE_VISIBILITY void exceptions(iostate __except);
3> ^
3>C:\webcompiler\External\EMScripten\system\include\libcxx\ios:555:30: error: expected ')'
3>ios_base::exceptions(iostate __except)
3> ^
3>C:\webcompiler\External\EMScripten\system\include\libcxx\ios:555:21: note: to match this '('
3>ios_base::exceptions(iostate __except)
3> ^
3>C:\webcompiler\External\EMScripten\system\include\libcxx\ios:557:21: error: expected expression
3> __exceptions_ = __except;
3> ^
3>C:\webcompiler\External\EMScripten\system\include\libcxx\ios:586:51: error: expected ')'
3> _LIBCPP_ALWAYS_INLINE void exceptions(iostate __except) {ios_base::exceptions(__except);}
3> ^
3>C:\webcompiler\External\EMScripten\system\include\libcxx\ios:586:42: note: to match this '('
3> _LIBCPP_ALWAYS_INLINE void exceptions(iostate __except) {ios_base::exceptions(__except);}
3> ^
3>2 warnings and 4 errors generated.
3>Build log was saved at "file://c:\Icewave\test\TestGame\build\windows\WebGL\BuildLog.htm"
3>TestGame - 4 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 2 skipped ==========

Do you have a clue if this syntax is legal?

Code line
=======
_LIBCPP_ALWAYS_INLINE void exceptions(iostate __except) {ios_base::exceptions(__except);}