c++: local externs in templates do not get template head

Nathan Sidwell nathan@acm.org
Mon Sep 14 16:45:33 GMT 2020


Now we consistently mark local externs with DECL_LOCAL_DECL_P, we can
teach the template machinery not to give them a TEMPLATE_DECL head,
and the instantiation machinery treat them as the local specialiations
they are.  (openmp UDRs also fall into this category, and are dealt
with similarly.)

         gcc/cp/
         * pt.c (push_template_decl_real): Don't attach a template head to
         local externs.
         (tsubst_function_decl): Add support for headless local extern
         decls.
         (tsubst_decl): Add support for headless local extern decls.

pushed to trunk
-- 
Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: local-extern-tpl.diff
Type: text/x-patch
Size: 3432 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200914/b87c3124/attachment.bin>


More information about the Gcc-patches mailing list