This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/45963] inconsistent and poor array initialization diagnostic
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Aug 2017 13:07:07 +0000
- Subject: [Bug c++/45963] inconsistent and poor array initialization diagnostic
- Auto-submitted: auto-generated
- References: <bug-45963-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45963
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-08-15
CC| |egallager at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
g++'s message is now:
$ /usr/local/bin/g++ -c 45963.cc
45963.cc: In constructor ‘bar::bar()’:
45963.cc:9:13: error: incompatible types in assignment of ‘int’ to ‘int [5]’
bar() : a(1) {}
^
45963.cc: In constructor ‘bar::bar(bool)’:
45963.cc:10:17: error: invalid initializer for array member ‘foo bar::b [5]’
bar(bool) : b(1) {}
^
$
Which I guess is kinda better than before, but looking at the Comeau output you
posted, g++ could still probably add a fixit hint or something, so confirmed.