c++: Fix stdcall attribute in template. [PR95222]
authorJason Merrill <jason@redhat.com>
Mon, 25 May 2020 23:04:05 +0000 (19:04 -0400)
committerJason Merrill <jason@redhat.com>
Wed, 27 May 2020 14:05:36 +0000 (10:05 -0400)
commit7e7d9fcff56385812764cba63e1ebf6f4c6c0320
tree03fd6be5b8acba5828f235a00df7b3cfb782f688
parentac9face8d26ea4b6aa72902ecc22e89ef00763c5
c++: Fix stdcall attribute in template. [PR95222]

Another case that breaks with my fix for PR90750: we shouldn't move type
attributes in TYPENAME context either, as there's no decl for them to move
to.

gcc/cp/ChangeLog:

PR c++/95222
* decl.c (grokdeclarator): Don't shift attributes in TYPENAME
context.

gcc/testsuite/ChangeLog:

PR c++/95222
* g++.dg/ext/tmplattr10.C: New test.
gcc/cp/decl.c
gcc/testsuite/g++.dg/ext/tmplattr10.C [new file with mode: 0644]