http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51373

Daniel Krügler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler at
                   |                            |googlemail dot com

--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2011-12-03 19:17:09 UTC ---
(In reply to comment #0)
> gcc version 4.7.0 20111112 (experimental) (GCC) 

Also in 4.7.0 20111126 (experimental)

> Two seemingly relate ICEs when dealing with pointer to member:
> 
> struct foo {
>     int a = 42;
>     static int foo::*b = &foo::a;
> };

b needs to have a constexpr specifier here, but it ICEs also with that one
added. Even with the constexpr specifier that declaration should be ill-formed,
because the class definition must be complete for an in-class static data
member initializer. Also, the initializer for a is not needed to reproduce the
error.

> struct foo {
>     int a = 42;
>     static int foo::*b;
>     auto& c = b;
> };
> internal compiler error: in unify_one_argument, at cp/pt.c:15008

The declaration of c cannot use auto (only static data members may do) and the
ICE does no longer occur after the fix. In addition, the declaration of a is
not needed to reproduce the problem.

Reply via email to