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
This commit is contained in:
Jason Merrill 2011-03-11 17:38:58 -05:00 committed by Jason Merrill
parent 1b9b91a68b
commit f231b5ff3f
5 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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;

View File

@ -1,5 +1,7 @@
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.

View File

@ -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. */

View File

@ -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,