[doc,committed] clarify -fno-implicit-templates usage

Message ID 08230f66-25c8-c577-8ebc-133ca73ab47c@codesourcery.com
State New
Headers show
  • [doc,committed] clarify -fno-implicit-templates usage
Related show

Commit Message

Sandra Loosemore Nov. 17, 2018, 4:16 p.m.
This patch is for PR 4025, one of the oldest documentation issues in 
bugzilla.  I think that since 2001 (GCC 3.0) expectations for C++ 
template handling have evolved so that users expect it to "just work" 
without messing with options like this, but it's a trivial fix to the docs.



Index: gcc/doc/invoke.texi
--- gcc/doc/invoke.texi	(revision 266233)
+++ gcc/doc/invoke.texi	(working copy)
@@ -2574,6 +2574,9 @@  This option is implied by the strict ISO
 @opindex fimplicit-templates
 Never emit code for non-inline templates that are instantiated
 implicitly (i.e.@: by use); only emit code for explicit instantiations.
+If you use this option, you must take care to structure your code to
+include all the necessary explicit instantiations to avoid getting
+undefined symbols at link time.
 @xref{Template Instantiation}, for more information.
 @item -fno-implicit-inline-templates