[Bug c++/50233] Internal compiler error: in build_value_init_noctor, at cp/init.c:336
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Tue Aug 30 09:38:00 GMT 2011
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.
More information about the Gcc-bugs
mailing list