This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33078] New: g++ treats extern "c" static void foo(void); different to extern "c" {static void foo(void);}
- From: "room_debugs at outgesourced dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Aug 2007 12:38:07 -0000
- Subject: [Bug c++/33078] New: g++ treats extern "c" static void foo(void); different to extern "c" {static void foo(void);}
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
g++ --version
g++ (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
on debian lenny i386; reproduced on sid amd64 too.
g++ -DUNIX_THREADING -D_THREAD_SAFE -D_REENTRANT -ggdb -Wall -DLINUX -D_POSIX_
SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -DUSE_STRCASECMP -DUSE_STRNCASECMP -g -pg
-c test1.cpp
test1.cpp:3: error: invalid use of 'static' in linkage specification
test1.cpp: In function 'void* CheckServerThread(void*)':
test1.cpp:8: error: 'void* CheckServerThread(void*)' was declared 'extern' and
later 'static'
test1.cpp:4: error: previous declaration of 'void* CheckServerThread(void*)'
--
Summary: g++ treats extern "c" static void foo(void); different
to extern "c" {static void foo(void);}
Product: gcc
Version: 4.1.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: room_debugs at outgesourced dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33078