Bug 65067

Summary: uninitialized const memeber error with g++ 3.1
Product: [Retired] Red Hat Linux Reporter: Alexander Larsson <alexl>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-12-15 20:26:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexander Larsson 2002-05-16 22:15:25 UTC
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.

Comment 1 Alan Cox 2002-12-15 20:26:31 UTC
Ok in 3.2 / 8.0