Bug 11792 - two externs on explicit declarations
Summary: two externs on explicit declarations
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 3.3.1
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-04 17:16 UTC by Roderick van Domburg
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: FreeBSD/i386 5.1-CURRENT
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Preprocessed proxy.cpp source (50.95 KB, application/octet-stream)
2003-08-04 19:00 UTC, Roderick van Domburg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roderick van Domburg 2003-08-04 17:16:05 UTC
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.
Comment 1 Andrew Pinski 2003-08-04 18:30:48 UTC
Read http://gcc.gnu.org/bugs.html, we need the preprocessed source.
Comment 2 Roderick van Domburg 2003-08-04 19:00:10 UTC
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!
Comment 3 Andrew Pinski 2003-08-05 00:21:44 UTC
Can you provide the output of "gcc -v"?
I could not reproduce this on an unmodified version of 3.3.1 (20030707).
Comment 4 Roderick van Domburg 2003-08-05 10:05:33 UTC
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)

Comment 5 Andrew Pinski 2003-08-05 13:05:34 UTC
The compile works for me, must be a problem with a modified compiler, report it to FreeBSD.