This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50233] Internal compiler error: in build_value_init_noctor, at cp/init.c:336
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 30 Aug 2011 09:30:48 +0000
- Subject: [Bug c++/50233] Internal compiler error: in build_value_init_noctor, at cp/init.c:336
- Auto-submitted: auto-generated
- References: <bug-50233-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50233
--- Comment #3 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2011-08-30 09:30:48 UTC ---
(In reply to comment #2)
> Good. 4_6-branch behaves the same. Do we agree that GCC is correct in rejecting
> this (without ICE-ing of course)?
I think that gcc is right rejecting it. The case is similar to the following
one:
int main()
{
constexpr int i{};
constexpr const int* p = &i;
}
This program is ill-formed, because i is a variable without static storage
duration, and thus does not allow for forming an address-constant expression.