[Bug c++/70820] GCC incorrectly accepts code that accesses nested names in an incomplete type
fdrocha at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Apr 27 17:16:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70820
Fabio Rocha <fdrocha at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Fabio Rocha <fdrocha at gmail dot com> ---
(In reply to Jason Merrill from comment #1)
> 14.7.1: "The implicit instantiation of a class template specialization
> causes the implicit instantiation of the declarations, but not of the
> definitions, default arguments, or exception-specifications of the class
> member functions, member classes, scoped member enumerations, static data
> members and member templates; and it causes the implicit instantiation of
> the definitions of unscoped member enumerations and member anonymous unions."
>
> So I don't think that the instantiation of Base<Derived> requires the
> instantiation of the definition of Base<Derived>::i.
You may be correct, not sure this is actually bug.
Still, it feels pretty strange that uncommenting the "First Assert" is what
makes the code incorrect...
More information about the Gcc-bugs
mailing list