This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/50233] Internal compiler error: in build_value_init_noctor, at cp/init.c:336


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]