compilation fails with -ansi key on gcc 3.3.3 bash-2.05b# cat go.cc #include <string> int main () { return 0; } bash-2.05b# g++ go.cc -ansi In file included from /usr/include/g++/bits/fpos.h:45, from /usr/include/g++/bits/char_traits.h:46, from /usr/include/g++/string:47, from go.cc:1: /usr/include/g++/cwchar:229: `wcstoll' not declared /usr/include/g++/cwchar:230: `wcstoull' not declared /usr/include/g++/cwchar:236: `wcstoll' not declared /usr/include/g++/cwchar:237: `wcstoull' not declared In file included from /usr/include/g++/bits/stl_algobase.h:67, from /usr/include/g++/memory:54, from /usr/include/g++/string:48, from go.cc:1: /usr/include/g++/cstdlib:138: `lldiv_t' not declared /usr/include/g++/cstdlib:148: syntax error before `(' token In file included from /usr/include/g++/bits/stl_algobase.h:67, from /usr/include/g++/memory:54, from /usr/include/g++/string:48, from go.cc:1: /usr/include/g++/cstdlib:125:1: unterminated #if /usr/include/g++/cstdlib:44:1: unterminated #ifndef In file included from /usr/include/g++/memory:54, from /usr/include/g++/string:48, from go.cc:1: /usr/include/g++/bits/stl_algobase.h:61:1: unterminated #ifndef In file included from /usr/include/g++/string:48, from go.cc:1: /usr/include/g++/memory:49:1: unterminated #ifndef In file included from go.cc:1: /usr/include/g++/string:40:1: unterminated #ifndef bash-2.05b# uname -v FreeBSD 5.1-BETA #0: Mon May 26 09:53:24 KGST 2003 root@warcomp.elcat.kg:/usr/obj/usr/src/sys/WARLOCK bash-2.05b# gcc -v Using built-in specs. Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 3.2.2 [FreeBSD] 20030205 (release)
Please carefully check your gcc build/install and your compile environment. By default gcc-3.2.2 doesn't include anything in /usr/include/g++, it uses /usr/include/c++/3.2.2/.
Subject: Re: strings with -ansi I checked it /usr/include/g++ is default place for FreeBSD 5.X I cvsuped gcc source code along with entire OS code sirl@gcc.gnu.org wrote: >PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. > >http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10993 > > >sirl@gcc.gnu.org changed: > > What |Removed |Added >---------------------------------------------------------------------------- > Status|UNCONFIRMED |WAITING > Summary|strings with -ansi |strings with -ansi > > >------- Additional Comments From sirl@gcc.gnu.org 2003-05-27 11:28 ------- >Please carefully check your gcc build/install and your compile environment. By >default gcc-3.2.2 doesn't include anything in /usr/include/g++, it uses >/usr/include/c++/3.2.2/. > > > > >------- You are receiving this mail because: ------- >You reported the bug, or are watching the reporter. > >. > > >
Subject: Re: strings with -ansi At 13:48 27.05.2003, warlock@mail.kg wrote: >------- Additional Comments From warlock@mail.kg 2003-05-27 11:48 ------- >Subject: Re: strings with -ansi > >I checked it > >/usr/include/g++ is default place for FreeBSD 5.X >I cvsuped gcc source code along with entire OS code /usr/include/g++ is a very bad choice. This directory was renamed and got versioned during the gcc2 to gcc3 switch for very good reasons. So, as a start, at least "rm -rf /usr/include/g++" before running gcc's "make install" to get a valid environment. Hmm, the gcc -v output of your build looks totally hosed too (it doesn't show the options passed to configure, so how got the g++ default include dir changed?), I think your build is quite broken. Franz.
Thank you for the report. This issue has been fixed in the FSF tree for the gcc 3.3 release. The FreeBSD system compiler will get the fix when it imports 3.3 src from the FSF. Franz, thank you for the input. Please note that this is not an FSF release (in terms of paths appearing broken and version string looking strange). *** This bug has been marked as a duplicate of 7680 ***