public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/2125: Namespaces are confused by forward-referencing typedefs
@ 2001-04-01 0:00 stephen.webb
0 siblings, 0 replies; only message in thread
From: stephen.webb @ 2001-04-01 0:00 UTC (permalink / raw)
To: gcc-gnats
>Number: 2125
>Category: c++
>Synopsis: Namespaces are confused by forward-referencing typedefs
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Wed Feb 28 06:56:03 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: stephen.webb@cybersafe.com
>Release: gcc version 3.0 20010219 (prerelease)
>Organization:
>Environment:
>Description:
The following code fragment
// begin oink.cpp
namespace A {
typedef class C C;
typedef int T;
class C { T i; };
}
// end oink.cpp
produces the following error when compiled with "gcc -c oink.cpp".
oink.cpp:4: syntax error before `;' token
This code is accepted by gcc 2.95.2 and MSVC 12.00.8804.
Note that the following code is accepted.
// ... begin oink2.cpp
namespace A {
typedef class C C;
typedef int T;
class C { A::T i; };
}
// ... end oink2.cpp
This example was distilled from preprocessed Solaris 8 system headers.
>How-To-Repeat:
See description.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-04-01 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-01 0:00 c++/2125: Namespaces are confused by forward-referencing typedefs stephen.webb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).