[Bug c++/79585] spurious -Wunused-variable on a pointer with attribute unused in function template
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 28 15:52:33 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79585
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:aa988998be8f85334665a6b049d5d9139408c250
commit r9-8550-gaa988998be8f85334665a6b049d5d9139408c250
Author: Jason Merrill <jason@redhat.com>
Date: Mon Jan 27 05:45:01 2020 -0500
c++: Avoid ICE with dependent attribute on type.
We previously happened to accept this testcase, but never actually did
anything useful with the attribute. The patch for PR86379 stopped using
TREE_TYPE as USING_DECL_SCOPE, so 'using A::b' no longer had TREE_TYPE set,
so the language-independent decl_attributes started crashing on it.
GNU attributes are more flexible in their placement than C++11 attributes,
so if we encounter a dependent GNU attribute that syntactically appertains
to a type rather than the declaration as a whole, move it to the
declaration; that's almost certainly what the user meant, anyway.
gcc/cp/ChangeLog
2020-01-27 Jason Merrill <jason@redhat.com>
PR c++/90750
PR c++/79585
* decl.c (grokdeclarator): Move dependent attribute to decl.
* decl2.c (splice_template_attributes): No longer static.
More information about the Gcc-bugs
mailing list