This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/152: Re: g++ 2.95.2 rejects linkage specification in typedefs
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/152: Re: g++ 2.95.2 rejects linkage specification in typedefs
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Wed, 29 Mar 2000 08:20:41 +0200
- References: <38E14031.19A89264@roguewave.com>
- Resent-Cc: gcc-prs at gcc dot gnu dot org, sebor at roguewave dot com
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
>Number: 152
>Category: c++
>Synopsis: g++ 2.95.2 rejects linkage specification in typedefs
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: analyzed
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue Mar 28 22:36:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Martin Sebor <sebor@roguewave.com>
>Release: 2.95.2
>Organization:
>Environment:
>Description:
Original-Message-ID: <38E14031.19A89264@roguewave.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'
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: