------- Comment #8 from rguenth at gcc dot gnu dot org  2009-02-19 15:20 -------
Note that the patch only affects extern explicit template instantiations.

  /* Check to see whether we know that this template will be
     instantiated in some other file, as with "extern template"
     extension.  */
  external_p = (DECL_INTERFACE_KNOWN (d) && DECL_REALLY_EXTERN (d));
  /* In general, we do not instantiate such templates...  */
  if (external_p
      /* ... but we instantiate inline functions so that we can inline
         them and ... */
      && ! (TREE_CODE (d) == FUNCTION_DECL
            && DECL_DECLARED_INLINE_P (d))

For them we would no longer inline (or rather instantiate) not inline declared
members.  This may affect parts of libstdc++, but I don't know.

In YCP the extern trick seems to be used to break a dependency cycle, so the
situation is somewhat special.

The ultimate question is of course if the standard allows (or even requires)
an error here.


-- 


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

Reply via email to