G++ bug?
Jason Merrill
jason@redhat.com
Fri May 17 14:18:00 GMT 2002
>>>>> "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!
More information about the Gcc-bugs
mailing list