Studio Express under Linux can't handle <string> header

I'm seeing a problem with the December build of Studio Express under Linux.

Stripped down to bare essentials, it looks like this:

% uname -a

Linux ferrari 2.6.9-42.EL #1 Wed Jul 12 23:15:20 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux

% cat foo.cc

#include <string>

int foo ()

{

return 0;

}

% CC -D_POSIX_C_SOURCE=200112L -c foo.cc

"/usr/include/string.h", line 272: Error: End of file encountered in macro arguments for "__nonnull".

"/usr/include/string.h", line 272: Error: ")" expected instead of "(".

"/usr/include/string.h", line 272: Error: Unexpected ")" -- Check for matching parenthesis.

"/usr/include/string.h", line 272: Error: Operand expected instead of ";".

"/usr/include/string.h", line 426: Error: "strerror_r(int, char*, unsigned long)" is expected to return a value.

"/pub/opt/sun/sunstudiomars/prod/include/CC/new", line 32: Error: operator new(unsigned long) was declared before with a different language.

"/pub/opt/sun/sunstudiomars/prod/include/CC/new", line 35: Error: operator delete(void*) was declared before with a different language.

"/pub/opt/sun/sunstudiomars/prod/include/CC/new", line 37: Error: operator new[](unsigned long) was declared before with a different language.

"/pub/opt/sun/sunstudiomars/prod/include/CC/new", line 40: Error: operator delete[](void*) was declared before with a different language.

"/pub/opt/sun/sunstudiomars/prod/include/CC/new", line 53: Error: Only one of a set of overloaded functions can be extern "C".

"/pub/opt/sun/sunstudiomars/prod/include/CC/new", line 54: Error: Only one of a set of overloaded functions can be extern "C".

"/pub/opt/sun/sunstudiomars/prod/include/CC/new", line 55: Error: Only one of a set of overloaded functions can be extern "C".

"/pub/opt/sun/sunstudiomars/prod/include/CC/new", line 56: Error: Only one of a set of overloaded functions can be extern "C".

"/pub/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 106: Error: Template declarations cannot have extern "C" linkage.

"/pub/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 169: Error: Template declarations cannot have extern "C" linkage.

"/pub/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 185: Error: Template declarations cannot have extern "C" linkage.

"/pub/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 198: Error: Template declarations cannot have extern "C" linkage.

"/pub/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 202: Error: Template declarations cannot have extern "C" linkage.

"/pub/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 206: Error: Template declarations cannot have extern "C" linkage.

"/pub/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 217: Error: Only one of a set of overloaded functions can be extern "C".

"/pub/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 225: Error: Template declarations cannot have extern "C" linkage.

"/pub/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 239: Error: Template declarations cannot have extern "C" linkage.

"/pub/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 249: Error: Template declarations cannot have extern "C" linkage.

"/pub/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 264: Error: Template declarations cannot have extern "C" linkage.

"/pub/opt/sun/sunstudiomars/prod/include/CC/Cstd/rw/iterator", line 275: Error: Template declarations cannot have extern "C" linkage.

Compilation aborted, too many Error messages.

[3736 byte] By [hertega] at [2007-11-26 13:50:44]
# 1
Which Linux is that?I cant reproduce it on SuSE9.2 (both 32 and 64bit ones).regards,__Fedor.
SFVa at 2007-7-8 1:27:40 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

% cat /etc/redhat-release

Red Hat Enterprise Linux WS release 4 (Nahant Update 4)

The proximate cause of the failure in /usr/include/string.h is:

269 # ifdef __REDIRECT_NTH

270 extern int __REDIRECT_NTH (strerror_r,

271(int __errnum, char *__buf, size_t __buflen),

272__xpg_strerror_r) __nonnull ((2));

273 # else

hertega at 2007-7-8 1:27:40 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
Some problem in this thread... http://forum.java.sun.com/thread.jspa?threadID=5109045&tstart=0remove the __nonnull statement from the include file and all compiles/Lars
Lars_Va at 2007-7-8 1:27:40 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4
Sorry, that's a totally impractical action. These are system header files, and nobody is about to go through local wholesale modification of what ships with the OS just to accommodate this one compiler.
hertega at 2007-7-8 1:27:40 > top of Java-index,Development Tools,Solaris and Linux Development Tools...