This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13402] Wrong default value for uninitialized pointer-to-member


------- Additional Comments From bangerth at dealii dot org  2003-12-15 15:51 -------
The program has undefined semantics. By 12.1/5, the default constructor of 
B initializes the pointer as if it was default initialized as if a user 
specified constructor had an empty initializer list. 12.6.2/4 treats the 
case of members not listed in the initializer list, and says that POD 
types (e.g. pointers to members) are not initialized at all. I.e., the 
given program has undefined behavior. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13402


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]