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.

Reply via email to