On 01/12/2016 01:11 PM, Martin Sebor wrote:
On 01/11/2016 10:20 PM, Jason Merrill wrote:
On 12/22/2015 09:32 PM, Martin Sebor wrote:
+ if (is_attribute_p ("aligned", name)
+ || is_attribute_p ("vector_size", name))
+ {
+ /* Attribute argument may be a dependent indentifier. */
+ if (tree t = args ? TREE_VALUE (args) : NULL_TREE)
+ if (value_dependent_expression_p (t)
+ || type_dependent_expression_p (t))
+ return true;
+ }
Instead of this, is_late_template_attribute should be fixed to check
attribute_takes_identifier_p.
attribute_takes_identifier_p() returns false for the aligned
attribute and for vector_size (it returns true only for
attributes cleanup, format, and mode, and none others).
Right. The problem is this code in is_late_template_attribute:
/* If the first attribute argument is an identifier, only consider
second and following arguments. Attributes like mode, format,
cleanup and several target specific attributes aren't late
just because they have an IDENTIFIER_NODE as first argument. */
if (arg == args && identifier_p (t))
continue;
It shouldn't skip an initial identifier if !attribute_takes_identifier_p.
Jason