Acccording to C++ standard 7.5/7 "A linkage-specification directly containing a single declaration shall not specify a storage class." They also give the following example as invalid:
extern "C" static void foo(); But g++ version 4.0.2 accepts this. -- Summary: extern "C" static function should not be allowed Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pr2345 at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26068