This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: G++ bug?
- From: Jason Merrill <jason at redhat dot com>
- To: Alex Larsson <alexl at redhat dot com>
- Cc: Alexandre Oliva <aoliva at redhat dot com>, gcc-bugs at gcc dot gnu dot org
- Date: Fri, 17 May 2002 21:48:18 +0100
- Subject: Re: G++ bug?
- References: <Pine.LNX.4.44.0205161520300.14836-100000@devserv.devel.redhat.com>
>>>>> "Alex" == Alex Larsson <alexl@redhat.com> writes:
This testcase was broken by Alexandre Oliva's recent initializer patch.
> Building fam with gcc 3.1 i stumbled upon this gem:
> struct FDInfo {
> struct FDIOHandler {
> void *closure;
> } read, write;
> };
> struct IOTypeInfo {
> FDInfo::FDIOHandler FDInfo::*const iotype;
> IOTypeInfo(FDInfo::FDIOHandler FDInfo::* a_iotype) : iotype(a_iotype) {
> }
> };
> IOTypeInfo foo (&FDInfo::read);
> It gives me:
> foo.c++:12: uninitialized const member `IOTypeInfo::iotype'
> But it worked in gcc 2.96, and i fail to see the problem. iotype is
> clearly initialized.
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Alexander Larsson Red Hat, Inc
> alexl@redhat.com alla@lysator.liu.se
> He's a lounge-singing playboy senator She's a cynical motormouth former first
> lady who dreams of becoming Elvis. They fight crime!