aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-03-11 17:38:58 -0500
committerJason Merrill <jason@gcc.gnu.org>2011-03-11 17:38:58 -0500
commitf231b5ff3ff72471bbe245863c3e37d96ed7d950 (patch)
treeb22f880d00c1c749cca15e7ddb3cc410f2666be0
parent1b9b91a68bbabc72c0329b39a6f91f27f9b831d0 (diff)
downloadgcc-f231b5ff3ff72471bbe245863c3e37d96ed7d950.zip
gcc-f231b5ff3ff72471bbe245863c3e37d96ed7d950.tar.gz
gcc-f231b5ff3ff72471bbe245863c3e37d96ed7d950.tar.bz2
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
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/attribs.c2
-rw-r--r--gcc/c-family/ChangeLog2
-rw-r--r--gcc/c-family/c-common.c2
-rw-r--r--gcc/tree.h2
5 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 039d9ad..0df542c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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>
* config/sparc/sparc.c (sparc_option_override): Use
diff --git a/gcc/attribs.c b/gcc/attribs.c
index d8daa6f..fee1499 100644
--- a/gcc/attribs.c
+++ b/gcc/attribs.c
@@ -208,7 +208,7 @@ register_attribute (const struct attribute_spec *attr)
/* 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;
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 35ca9a3..6b5fd91 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,5 +1,7 @@
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.
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 32b9a70..4da9a2d 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -5665,7 +5665,7 @@ c_init_attributes (void)
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. */
diff --git a/gcc/tree.h b/gcc/tree.h
index 296e6de..2a94b3a 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -5348,7 +5348,7 @@ extern bool must_pass_in_stack_var_size_or_pad (enum machine_mode, const_tree);
/* 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,