Hi,
On 29/01/20 19:00, Jason Merrill wrote:
On 1/29/20 4:31 AM, Paolo Carlini wrote:
Hi,
in this regression we issue a diagnostic about an incomplete type
(only a warning by default) and then we crash when we try to query
has_attribute on a member of the type because in such cases the
member remains an IDENTIFIER_NODE which of course doesn't have a
TREE_TYPE neither a DECL_ATTRIBUTES... Simply recognizing
IDENTIFIER_NODEs and returning false works fine, not sure if we want
to do something more sophisticated. Tested x86_64-linux.
Why are we getting to has_attribute at all for a type-dependent argument?
Because the implementation of __builtin_has_attribute, largely shared
with the C front-end, doesn't know about templates at all? :-/
Not sure it's the best time to complete it, but shouldn't be too difficult.
Paolo.