aboutsummaryrefslogtreecommitdiff
path: root/gcc/vr-values.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-10-29 04:56:27 -0700
committerNathan Sidwell <nathan@acm.org>2020-10-29 07:16:45 -0700
commit9703b8d98c116e7abb01e6d261d64458dda9c08c (patch)
tree496fc9724c1e2aed2b148dbbad51b6dbd7df6db4 /gcc/vr-values.c
parent2e0216f9c4db8fde09706f57e6a6d80161c0da07 (diff)
downloadgcc-9703b8d98c116e7abb01e6d261d64458dda9c08c.zip
gcc-9703b8d98c116e7abb01e6d261d64458dda9c08c.tar.gz
gcc-9703b8d98c116e7abb01e6d261d64458dda9c08c.tar.bz2
c++: Stop (most) function-scope entities having a template header
Currently push_template_decl (mostly) decides whether to add a template header to an entity by seeing if it has DECL_LANG_SPECIFIC. That might have been a useful predicate at one time, but basing semantic implications on how we've decided to represent decls is bound to be brittle. And indeed it is, as more decls grow a use for lang-specific. In particular I discovered that function-scope VAR_DECLs couild grow lang-specific, and thereby get a template header. There's no need for that, and it breaks an invariant modules was expected. This patch changes that, and bases the descision on the properties of the decl. In particular the only function-scope decl that gets a template header is an implicit-typedef. I also cleaned up the behaviour of it building a template-info only to ignore it. gcc/cp/ * pt.c (push_template_decl): Do not give function-scope entities other than implicit typedefs a template header. Do not readd template info to a redeclared template.
Diffstat (limited to 'gcc/vr-values.c')
0 files changed, 0 insertions, 0 deletions