This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
g++ 2.95.2 rejects linkage specification in typedefs
- To: gcc bug list <gcc-bugs at gcc dot gnu dot org>
- Subject: g++ 2.95.2 rejects linkage specification in typedefs
- From: Martin Sebor <sebor at roguewave dot com>
- Date: Tue, 28 Mar 2000 16:28:49 -0700
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'