------- Comment #3 from s__nakayama at infoseek dot jp 2008-04-24 08:05 -------
(In reply to comment #2)
> 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.
I doubt this.
By 8.5/6, object of static storage duration shall be zero-initialized.
And, a implicit default constructor doesn't overwrite the value of the member.
--
s__nakayama at infoseek dot jp changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |s__nakayama at infoseek dot
| |jp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13402