[Bug c++/19246] Cannot instantiate const struct without constructor.
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Jan 4 00:45:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-04 00:45 -------
Hmm, comeu C++ also rejects it:
"ComeauTest.c", line 2: error: const variable "s" requires an initializer -- class
"S" has no explicitly declared default constructor
const S s;
^
"ComeauTest.c", line 2: warning: variable "s" was declared but never referenced
const S s;
Note VC++ does not reject non standard C++ by default.
You can try the comeau C++ online by:
<http://www.comeaucomputing.com/tryitout/>.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19246
More information about the Gcc-bugs
mailing list