Commit f231b5ff by Jason Merrill Committed by Jason Merrill

attribs.c (lookup_attribute_spec): Take const_tree.

	* 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
parent 1b9b91a6
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> 2011-03-11 Joseph Myers <joseph@codesourcery.com>
* config/sparc/sparc.c (sparc_option_override): Use * config/sparc/sparc.c (sparc_option_override): Use
......
...@@ -208,7 +208,7 @@ register_attribute (const struct attribute_spec *attr) ...@@ -208,7 +208,7 @@ register_attribute (const struct attribute_spec *attr)
/* Return the spec for the attribute named NAME. */ /* Return the spec for the attribute named NAME. */
const struct attribute_spec * const struct attribute_spec *
lookup_attribute_spec (tree name) lookup_attribute_spec (const_tree name)
{ {
struct substring attr; struct substring attr;
......
2011-03-11 Jason Merrill <jason@redhat.com> 2011-03-11 Jason Merrill <jason@redhat.com>
* c-common.c (attribute_takes_identifier_p): Add missing const.
PR c++/46803 PR c++/46803
* c-common.c (attribute_takes_identifier_p): Assume that an * c-common.c (attribute_takes_identifier_p): Assume that an
unknown attribute takes an identifier. unknown attribute takes an identifier.
......
...@@ -5665,7 +5665,7 @@ c_init_attributes (void) ...@@ -5665,7 +5665,7 @@ c_init_attributes (void)
bool bool
attribute_takes_identifier_p (const_tree attr_id) 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) if (spec == NULL)
/* Unknown attribute that we'll end up ignoring, return true so we /* Unknown attribute that we'll end up ignoring, return true so we
don't complain about an identifier argument. */ don't complain about an identifier argument. */
......
...@@ -5348,7 +5348,7 @@ extern bool must_pass_in_stack_var_size_or_pad (enum machine_mode, const_tree); ...@@ -5348,7 +5348,7 @@ extern bool must_pass_in_stack_var_size_or_pad (enum machine_mode, const_tree);
/* In attribs.c. */ /* 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, /* 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, which is either a DECL (including a TYPE_DECL) or a TYPE. If a DECL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment