aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2008-08-26 15:34:29 +0000
committerBen Elliston <bje@au.ibm.com>2008-08-26 15:34:29 +0000
commit50b4af3efe865f99c1bbb1912fc819e7ec90fb97 (patch)
treee250f4195c0edd9c93a3dad17048c6cad7a5e27b
parent34ad0f32a35aef04762756b4bce7da08d7140b7a (diff)
* gcc/tree.h (check_qualified_type): Use CONST_CAST_TREE as
needed. * gcc/langhooks.c (lhd_tree_dump_type_quals): Likewise. * gcc/c-typeck.c (comptypes_internal): Likewise. * gcc/cp/typeck.c (cp_type_quals): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/cell-4_3-branch@139598 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--ChangeLog.cell13
-rw-r--r--gcc/c-typeck.c2
-rw-r--r--gcc/cp/typeck.c2
-rw-r--r--gcc/langhooks.c2
-rw-r--r--gcc/tree.c4
-rw-r--r--gcc/tree.h2
6 files changed, 16 insertions, 9 deletions
diff --git a/ChangeLog.cell b/ChangeLog.cell
index 595b690d173..ee830d04bb6 100644
--- a/ChangeLog.cell
+++ b/ChangeLog.cell
@@ -1,8 +1,15 @@
+2008-08-27 Ben Elliston <bje@au.ibm.com>
+
+ * gcc/tree.h (check_qualified_type): Use CONST_CAST_TREE as
+ needed.
+ * gcc/langhooks.c (lhd_tree_dump_type_quals): Likewise.
+ * gcc/c-typeck.c (comptypes_internal): Likewise.
+ * gcc/cp/typeck.c (cp_type_quals): Likewise.
+
2008-08-26 Ben Elliston <bje@au.ibm.com>
- * gcc/tree.h (strip_array_types): Take a const_tree argument.
- * gcc/tree.c (strip_array_types): Likewise.
- * gcc/config/spu/spu.c (spu_valid_addr_space): Likewise.
+ * gcc/config/spu/spu.c (spu_valid_addr_space): Take a
+ const_tree argument.
2008-08-26 Ben Elliston <bje@au.ibm.com>
Alan Modra <amodra@au.ibm.com>
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index f2a60db8161..909edbe6a37 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -917,7 +917,7 @@ comptypes_internal (const_tree type1, const_tree type2)
/* Qualifiers must match. C99 6.7.3p9 */
- if (TYPE_QUALS (t1) != TYPE_QUALS (t2))
+ if (TYPE_QUALS (CONST_CAST_TREE (t1)) != TYPE_QUALS (CONST_CAST_TREE (t2)))
return 0;
/* Allow for two different type nodes which have essentially the same
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 60f48222590..3c4676525b6 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -7007,7 +7007,7 @@ cp_type_quals (const_tree type)
type = strip_array_types (CONST_CAST_TREE(type));
if (type == error_mark_node)
return TYPE_UNQUALIFIED;
- return TYPE_QUALS (type);
+ return TYPE_QUALS (CONST_CAST_TREE (type));
}
/* Returns nonzero if the TYPE is const from a C++ perspective: look inside
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index cad54fc35b7..4d8a8896e71 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -284,7 +284,7 @@ lhd_tree_dump_dump_tree (void *di ATTRIBUTE_UNUSED, tree t ATTRIBUTE_UNUSED)
int
lhd_tree_dump_type_quals (const_tree t)
{
- return TYPE_QUALS (t);
+ return TYPE_QUALS (CONST_CAST_TREE (t));
}
/* lang_hooks.expr_size: Determine the size of the value of an expression T
diff --git a/gcc/tree.c b/gcc/tree.c
index 819e0ff0c54..484c4444739 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4184,7 +4184,7 @@ set_type_quals (tree type, int type_quals)
bool
check_qualified_type (const_tree cand, const_tree base, int type_quals)
{
- return (TYPE_QUALS (cand) == type_quals
+ return (TYPE_QUALS (CONST_CAST_TREE (cand)) == type_quals
&& TYPE_NAME (cand) == TYPE_NAME (base)
/* Apparently this is needed for Objective-C. */
&& TYPE_CONTEXT (cand) == TYPE_CONTEXT (base)
@@ -5825,7 +5825,7 @@ maybe_canonicalize_argtypes(tree argtypes,
element type is found. */
tree
-strip_array_types (const_tree type)
+strip_array_types (tree type)
{
while (TREE_CODE (type) == ARRAY_TYPE)
type = TREE_TYPE (type);
diff --git a/gcc/tree.h b/gcc/tree.h
index 7584832d521..44870bfb0e0 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -4082,7 +4082,7 @@ extern bool tree_expr_nonnegative_p (tree);
extern bool tree_expr_nonnegative_warnv_p (tree, bool *);
extern bool may_negate_without_overflow_p (const_tree);
extern tree get_inner_array_type (const_tree);
-extern tree strip_array_types (const_tree);
+extern tree strip_array_types (tree);
/* Construct various nodes representing fract or accum data types. */