[Bug c++/49198] GCC generates spurious "has incomplete type" errors
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 27 21:16:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49198
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
Summary|[4.5/4.6/4.7 Regression] |GCC generates spurious "has
|GCC generates spurious "has |incomplete type" errors
|incomplete type" errors |
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-27 21:05:25 UTC ---
The instantiation is being triggered by argument-dependent lookup. When we see
FT(F), the associated classes for the argument F are the associated classes for
S<IC>*, or S<IC>, so we instantiate S<IC> to get any friend declarations.
If you change the call to ::FT(F), no argument-dependent lookup is done, so the
instantiation is not triggered.
More information about the Gcc-bugs
mailing list