This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51633] [c++0x] [4.6/4.7 Regression] ICE with invalid constexpr constructor
- From: "dodji at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 11 Jan 2012 13:22:55 +0000
- Subject: [Bug c++/51633] [c++0x] [4.6/4.7 Regression] ICE with invalid constexpr constructor
- Auto-submitted: auto-generated
- References: <bug-51633-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51633
--- Comment #4 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-01-11 13:22:55 UTC ---
It seems to me that the first example might actually be considered as
valid.
One non-fully clear reason why it could have been considered invalid
in the first place is tat the constructor of B does not explicitly
initialize a.
But then A doesn't have any member. So we can say in the end that "B
doesn't have any non-initialized member". And that can be argued to
comply with this relevant pre-requisite for constexpr constructors in
[dcl.constexpr]/8:
every non-static data member and base class sub-object shall be
initialized
I have discussed this with Jason off-line and he seems to agree.
Thought anyone?