* attribs.c (lookup_attribute_spec): Take const_tree.
* tree.h: Adjust.
* c-family/c-common.c (attribute_takes_identifier_p): Add missing const.
From-SVN: r170887
+2011-03-11 Jason Merrill <jason@redhat.com>
+
+ * attribs.c (lookup_attribute_spec): Take const_tree.
+ * tree.h: Adjust.
+
2011-03-11 Joseph Myers <joseph@codesourcery.com>
* config/sparc/sparc.c (sparc_option_override): Use
/* Return the spec for the attribute named NAME. */
const struct attribute_spec *
-lookup_attribute_spec (tree name)
+lookup_attribute_spec (const_tree name)
{
struct substring attr;
2011-03-11 Jason Merrill <jason@redhat.com>
+ * c-common.c (attribute_takes_identifier_p): Add missing const.
+
PR c++/46803
* c-common.c (attribute_takes_identifier_p): Assume that an
unknown attribute takes an identifier.
bool
attribute_takes_identifier_p (const_tree attr_id)
{
- struct attribute_spec *spec = lookup_attribute_spec (attr_id);
+ const struct attribute_spec *spec = lookup_attribute_spec (attr_id);
if (spec == NULL)
/* Unknown attribute that we'll end up ignoring, return true so we
don't complain about an identifier argument. */
/* In attribs.c. */
-extern const struct attribute_spec *lookup_attribute_spec (tree);
+extern const struct attribute_spec *lookup_attribute_spec (const_tree);
/* Process the attributes listed in ATTRIBUTES and install them in *NODE,
which is either a DECL (including a TYPE_DECL) or a TYPE. If a DECL,