[Bug c++/11497] const instance of class requires ctor definition
frank6thursday at aol dot com
gcc-bugzilla@gcc.gnu.org
Fri Jul 11 03:20:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11497
frank6thursday at aol dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
------- Additional Comments From frank6thursday at aol dot com 2003-07-11 03:20 -------
Oops..
>From 8.5/9:
If no initializer is specified for an object, and the object is of
(possibly cvÂqualified) nonÂPOD class type (or
array thereof), the object shall be defaultÂinitialized; if the object
is of constÂqualified type, the underlying
class type shall have a userÂdeclared default constructor. Otherwise, if
no initializer is specified for an
object, the object and its subobjects, if any, have an indeterminate
initial value 90) ; if the object or any of its
subobjects are of const-qualified type, the program is illÂformed.
Ergo, the compiler should have rejected my code.
More information about the Gcc-bugs
mailing list