http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49794
Summary: [4.7 regression] Solaris 10/x86 bootstrap broken by C++ build Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassig...@gcc.gnu.org ReportedBy: r...@gcc.gnu.org CC: i...@airs.com Host: i386-pc-solaris2.10 Target: i386-pc-solaris2.10 Build: i386-pc-solaris2.10 Solaris 10/x86 bootstrap is broken as of r176500: there are two failures in stage2 libcpp: /vol/gcc/src/hg/trunk/local/libcpp/charset.c: In function 'bool convert_using_iconv(iconv_t, const uchar*, size_t, _cpp_strbuf*)': /vol/gcc/src/hg/trunk/local/libcpp/charset.c:579:62: error: invalid conversion from 'const char**' to 'char**' [-fpermissive] The problem is that <iconv.h> has two variant iconv() declarations: #ifdef _XPG6 extern size_t iconv(iconv_t, char **_RESTRICT_KYWD, size_t *_RESTRICT_KYWD, char **_RESTRICT_KYWD, size_t *_RESTRICT_KYWD); #else extern size_t iconv(iconv_t, const char **_RESTRICT_KYWD, size_t *_RESTRICT_KYWD, char **_RESTRICT_KYWD, size_t *_RESTRICT_KYWD); #endif libcpp configure is run with xgcc, which doesn't define _XOPEN_SOURCE 600, but g++, which is used to compile libcpp, does, so the value of ICONV_CONST is wrong. The next failures is in init.c: /vol/gcc/src/hg/trunk/local/libcpp/init.c:61:3: error: expected identifier before '=' /vol/gcc/src/hg/trunk/local/libcpp/init.c:61:3: error: type '<lambda>' with no linkage used to declare function 'void<lambda>::operator()() const' with linkage [-fpermissive] /vol/gcc/src/hg/trunk/local/libcpp/init.c: In lambda function: /vol/gcc/src/hg/trunk/local/libcpp/init.c:61:3: error: expected '{' before '=' token /vol/gcc/src/hg/trunk/local/libcpp/init.c: At global scope: /vol/gcc/src/hg/trunk/local/libcpp/init.c:61:3: error: lambda expressions only available with -std=c++0x or -std=gnu++0x [-Werror] /vol/gcc/src/hg/trunk/local/libcpp/init.c:61:3: error: no match for 'operator=' in '{} = '#'' /vol/gcc/src/hg/trunk/local/libcpp/init.c:61:3: note: candidate is: /vol/gcc/src/hg/trunk/local/libcpp/init.c:61:3: note: <lambda()>&<lambda()>::operator=(const<lambda()>&) /vol/gcc/src/hg/trunk/local/libcpp/init.c:61:3: note: no known conversion for argument 1 from 'char' to 'const<lambda()>&' And many more errors. The relevant section in the -g3 -save-temps outputis __extension__ const uchar _cpp_trigraph_map[(127 * 2 + 1) + 1] = { ['='] = '#', [')'] = ']', ['!'] = '|', ['('] = '[', ['\''] = '^', ['>'] = '}', ['/'] = '\\', ['<'] = '{', ['-'] = '~', };