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.