This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/486: nested class forward declaration not recognized
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/486: nested class forward declaration not recognized
- From: daniel at cs dot washington dot edu
- Date: 23 Aug 2000 22:14:40 -0000
- Reply-To: daniel at cs dot washington dot edu
- Resent-Cc: gcc-prs at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, jason at gcc dot gnu dot org
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, daniel@cs.washington.edu
>Number: 486
>Category: c++
>Synopsis: nested class forward declaration not recognized
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Wed Aug 23 15:16:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: daniel@cs.washington.edu
>Release: Reading specs from /uns/gcc-2.95.2/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
>Description:
Simultaneously forward declaring a nested class and a
pointer to the class doesn't work because the compiler
sees the nested class as being in the global scope.
>How-To-Repeat:
This doesn't compile
-----------------------------------------------------
struct A
{
// struct B;
struct B *b;
};
struct A::B
{
int x;
};
-----------------------------------------------------
But it will if the 3rd line is uncommented.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: