This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g++ 2.95.2 rejects linkage specification in typedefs


Hi,

the program below gives an error with g++ 2.95.2. I suppose this is just an
unimplemented feature (see 7.5, p4) so if that's so I suggest that it be
implemented without regard to the the current restriction that "A
linkage-specification shall occur only in namespace scope..." This is currently
a CWG issue and it is likely to be modified so that linkage-specifications can
occur in typedefs at function, class, function signature, and class template
scope. Please see CWG issue 13 and the recent discussion Re: linkage
specification on the CWG mailing list (c++std-core@research.att.com).


Regards
Martin

$ cat test.cpp

extern "C" typedef void foo ();

$ g++ -c --pedantic test.cpp
test.cpp:3: multiple storage classes in declaration of `foo'

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]