Whilst compiling Kopete 0.6.2, gcc 3.3.1 20030711 stumles across two externs on explicit declarations, forbidden by ISO C++: /bin/sh ../../../../libtool --silent --mode=compile --tag=CXX c++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -I.. -I/usr/local/include -I/usr/X11R6/include -pthread -DQT_THREAD_SUPPORT -I/usr/local/include -I/usr/local/include -I/usr/X11R6/include -D_GETOPT_H -D_THREAD_SAFE -Wnon-virtual-dtor -Wno-long-long -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -O -pipe -march=pentium4 -march=pentium4 -fno-exceptions -fno-check-new -fno-common -c -o proxy.lo `test -f 'proxy.cpp' || echo './'`proxy.cpp In file included from /usr/include/c++/3.3/list:68, from buffer.h:48, from socket.h:40, from proxy.cpp:24: /usr/include/c++/3.3/bits/stl_alloc.h:968: error: ISO C++ forbids the use of ` extern' on explicit instantiations /usr/include/c++/3.3/bits/stl_alloc.h:969: error: ISO C++ forbids the use of ` extern' on explicit instantiations /usr/include/c++/3.3/bits/stl_alloc.h:970: error: ISO C++ forbids the use of ` extern' on explicit instantiations /usr/include/c++/3.3/bits/stl_alloc.h:970: error: ISO C++ forbids the use of ` extern' on explicit instantiations /usr/include/c++/3.3/bits/stl_alloc.h:970: error: ISO C++ forbids the use of ` extern' on explicit instantiations In file included from /usr/include/c++/3.3/string:57, from buffer.h:49, from socket.h:40, from proxy.cpp:24: /usr/include/c++/3.3/bits/basic_string.tcc:1061: error: ISO C++ forbids the use of `extern' on explicit instantiations /usr/include/c++/3.3/bits/basic_string.tcc:1061: error: ISO C++ forbids the use of `extern' on explicit instantiations /usr/include/c++/3.3/bits/basic_string.tcc:1061: error: ISO C++ forbids the use of `extern' on explicit instantiations /usr/include/c++/3.3/bits/basic_string.tcc:1064: error: ISO C++ forbids the use of `extern' on explicit instantiations /usr/include/c++/3.3/bits/basic_string.tcc:1067: error: ISO C++ forbids the use of `extern' on explicit instantiations /usr/include/c++/3.3/bits/basic_string.tcc:1070: error: ISO C++ forbids the use of `extern' on explicit instantiations /usr/include/c++/3.3/bits/basic_string.tcc:1073: error: ISO C++ forbids the use of `extern' on explicit instantiations /usr/include/c++/3.3/bits/basic_string.tcc:1076: error: ISO C++ forbids the use of `extern' on explicit instantiations /usr/include/c++/3.3/bits/basic_string.tcc:1076: error: ISO C++ forbids the use of `extern' on explicit instantiations /usr/include/c++/3.3/bits/basic_string.tcc:1076: error: ISO C++ forbids the use of `extern' on explicit instantiations /usr/include/c++/3.3/bits/basic_string.tcc:1079: error: ISO C++ forbids the use of `extern' on explicit instantiations /usr/include/c++/3.3/bits/basic_string.tcc:1082: error: ISO C++ forbids the use of `extern' on explicit instantiations /usr/include/c++/3.3/bits/basic_string.tcc:1085: error: ISO C++ forbids the use of `extern' on explicit instantiations /usr/include/c++/3.3/bits/basic_string.tcc:1088: error: ISO C++ forbids the use of `extern' on explicit instantiations gmake[5]: *** [proxy.lo] Error 1 gmake[5]: Leaving directory `/usr/ports/net/kopete/work/kopete-0.6.2/kopete/protocols/icq_new/libicq' gmake[4]: *** [all-recursive] Error 1 gmake[4]: Leaving directory `/usr/ports/net/kopete/work/kopete-0.6.2/kopete/protocols/icq_new' gmake[3]: *** [all-recursive] Error 1 gmake[3]: Leaving directory `/usr/ports/net/kopete/work/kopete-0.6.2/kopete/protocols' gmake[2]: *** [all-recursive] Error 1 gmake[2]: Leaving directory `/usr/ports/net/kopete/work/kopete-0.6.2/kopete' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/ports/net/kopete/work/kopete-0.6.2' gmake: *** [all] Error 2 *** Error code 2 Stop in /usr/ports/net/kopete.
Read http://gcc.gnu.org/bugs.html, we need the preprocessed source.
Created attachment 4561 [details] Preprocessed proxy.cpp source Considering this is my first bug report to the gcc project, I'm hoping this'll suffice. Forgive my ignorance!
Can you provide the output of "gcc -v"? I could not reproduce this on an unmodified version of 3.3.1 (20030707).
Subject: Re: two externs on explicit declarations > gcc -v Using built-in specs. Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 3.3.1 [FreeBSD] 20030711 (prerelease)
The compile works for me, must be a problem with a modified compiler, report it to FreeBSD.