🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1110

Possible bug parsing nested classes with typedefs in g++ 2.3.1

#1110
From: lewis
Date: Sat, 07 Nov 1992 14:29
33 lines
1171 bytes
/*
 * The following code compiles fine with qCompileFine 1, but fails
 * when compiled with qCompileFine 0.
 *
 * The file is compiled with gcc 2.3.1 as follows:
 *      g++ -c bug.c
 *
 * and the output is:
 *
 *      bug.c:28: assignment to non-static member `Fred' of enclosing class `Enclose'
 */
#define qCompileFine    0

struct  Base { Base (); };

struct  Enclose {
        struct  Fred : Base {
                Fred (const Fred& a);
        };
};


typedef Enclose::Fred   Fred;

#if     qCompileFine
Fred::Fred (const Enclose::Fred& a) :
#else
Fred::Fred (const Fred& a) :
#endif
        Base ()
{
}
Lewis Gordon Pringle, Jr.                                (lewis@sophists.com)
Technical Details
Message-ID: <m0mo0X2-000AWzC@sophists.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!sophists.COM!lewis

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!sophists.COM!lewis
From: lewis@sophists.COM
Subject: Possible bug parsing nested classes with typedefs in g++ 2.3.1
Message-ID: <m0mo0X2-000AWzC@sophists.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sat, 7 Nov 1992 14:29:36 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 35