aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Macleod <amacleod@redhat.com>2015-01-15 17:06:49 +0000
committerAndrew Macleod <amacleod@redhat.com>2015-01-15 17:06:49 +0000
commit7f2ec5015e61456ec82375c2aff95a56426d1fd0 (patch)
treeacb49f0d33b175566aec1ac7f4a5d0f0e70095a6
parent5598584090e74a4a28154e677fc933c910281f8f (diff)
2015-01-15 Andrew MacLeod <amacleod@redhat.com>ttype
* tree.h: Prototype changes from tree to ttype. * tree.c (build_type_attribute_qual_variant, build_type_attribute_variant, build_qualified_type, build_pointer_type_for_mode): Change parameter from tree to ttype. * attribs.c (finalize_type_attribute, type_attributes, decl_attributes): Fix tree and ttype mismatches. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ttype@219669 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.ttype9
-rw-r--r--gcc/attribs.c18
-rw-r--r--gcc/tree.c16
-rw-r--r--gcc/tree.h8
4 files changed, 30 insertions, 21 deletions
diff --git a/gcc/ChangeLog.ttype b/gcc/ChangeLog.ttype
index c039fc6ba95..ebf40e11665 100644
--- a/gcc/ChangeLog.ttype
+++ b/gcc/ChangeLog.ttype
@@ -1,3 +1,12 @@
+2015-01-15 Andrew MacLeod <amacleod@redhat.com>
+
+ * tree.h: Prototype changes from tree to ttype.
+ * tree.c (build_type_attribute_qual_variant,
+ build_type_attribute_variant, build_qualified_type,
+ build_pointer_type_for_mode): Change parameter from tree to ttype.
+ * attribs.c (finalize_type_attribute, type_attributes, decl_attributes):
+ Fix tree and ttype mismatches.
+
2015-01-15 Andrew MacLeod <amacleod@redhat.com>
* ttype.patch: Make error_type_node and error_mark_node different.
diff --git a/gcc/attribs.c b/gcc/attribs.c
index 2526479a2d1..de0afb9d1ec 100644
--- a/gcc/attribs.c
+++ b/gcc/attribs.c
@@ -398,16 +398,16 @@ process_attribute_spec (tree a, int flags)
the parameters match those of type_attribute. */
static tree
-finalize_type_attribute (tree *node, const struct attribute_spec *spec,
+finalize_type_attribute (ttype *node, const struct attribute_spec *spec,
tree a, tree returned_attrs, int flags,
tree *decl_node = NULL)
{
bool no_add_attrs = 0;
int fn_ptr_quals = 0;
- tree fn_ptr_tmp = NULL_TREE;
+ ttype fn_ptr_tmp = NULL;
tree name = get_attribute_name (a);
tree args = TREE_VALUE (a);
- tree *anode = node;
+ ttype *anode = node;
gcc_checking_assert (TYPE_P (*node));
@@ -498,7 +498,7 @@ finalize_type_attribute (tree *node, const struct attribute_spec *spec,
out to the other variants. */
if (*anode == TYPE_MAIN_VARIANT (*anode))
{
- tree variant;
+ ttype variant;
for (variant = *anode; variant;
variant = TYPE_NEXT_VARIANT (variant))
{
@@ -547,12 +547,12 @@ finalize_type_attribute (tree *node, const struct attribute_spec *spec,
declaration rather than to its type). */
tree
-type_attributes (tree *node, tree attributes, int flags)
+type_attributes (ttype *node, tree attributes, int flags)
{
tree a;
tree returned_attrs = NULL_TREE;
- if (TREE_TYPE (*node) == error_mark_node || attributes == error_mark_node)
+ if (TREE_TYPE (*node) == error_type_node || attributes == error_mark_node)
return NULL_TREE;
gcc_checking_assert (TYPE_P (*node));
@@ -622,7 +622,7 @@ decl_attributes (tree *node, tree attributes, int flags)
tree returned_attrs = NULL_TREE;
- if (TREE_TYPE (*node) == error_mark_node || attributes == error_mark_node)
+ if (TREE_TYPE (*node) == error_type_node || attributes == error_mark_node)
return NULL_TREE;
gcc_checking_assert (DECL_P (*node));
@@ -700,9 +700,9 @@ decl_attributes (tree *node, tree attributes, int flags)
the decl's type in place here. */
if (spec->type_required)
{
- anode = &TREE_TYPE (*anode);
+ ttype *typenode = &TREE_TYPE (*anode);
flags &= ~(int) ATTR_FLAG_TYPE_IN_PLACE;
- returned_attrs = finalize_type_attribute (anode, spec, a,
+ returned_attrs = finalize_type_attribute (typenode, spec, a,
returned_attrs, flags,
node);
continue;
diff --git a/gcc/tree.c b/gcc/tree.c
index d45e051d5de..49ac40b0f44 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4656,8 +4656,8 @@ build_decl_attribute_variant (tree ddecl, tree attribute)
Record such modified types already made so we don't make duplicates. */
-tree
-build_type_attribute_qual_variant (tree type, tree attribute, int quals)
+ttype
+build_type_attribute_qual_variant (ttype type, tree attribute, int quals)
{
if (! attribute_list_equal (TYPE_ATTRIBUTES (type), attribute))
{
@@ -4880,8 +4880,8 @@ comp_type_attributes (const_tree type1, const_tree type2)
Record such modified types already made so we don't make duplicates. */
-tree
-build_type_attribute_variant (tree type, tree attribute)
+ttype
+build_type_attribute_variant (ttype type, tree attribute)
{
return build_type_attribute_qual_variant (type, attribute,
TYPE_QUALS (type));
@@ -6373,8 +6373,8 @@ get_qualified_type (tree type, int type_quals)
/* Like get_qualified_type, but creates the type if it does not
exist. This function never returns NULL_TREE. */
-tree
-build_qualified_type (tree type, int type_quals)
+ttype
+build_qualified_type (ttype type, int type_quals)
{
tree t;
@@ -7588,8 +7588,8 @@ add_expr (const_tree t, inchash::hash &hstate)
reference all of memory. If such a type has already been
constructed, reuse it. */
-tree
-build_pointer_type_for_mode (tree to_type, machine_mode mode,
+ttype
+build_pointer_type_for_mode (ttype to_type, machine_mode mode,
bool can_alias_all)
{
tree t;
diff --git a/gcc/tree.h b/gcc/tree.h
index 2aaa2137706..aa284bcad0a 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -3714,7 +3714,7 @@ extern tree signed_type_for (tree);
extern tree unsigned_type_for (tree);
extern tree truth_type_for (tree);
extern tree build_pointer_type_for_mode (tree, machine_mode, bool);
-extern tree build_pointer_type (tree);
+extern ttype build_pointer_type (ttype);
extern tree build_reference_type_for_mode (tree, machine_mode, bool);
extern tree build_reference_type (tree);
extern tree build_vector_type_for_mode (tree, machine_mode);
@@ -3796,9 +3796,9 @@ extern tree make_tree (tree, rtx);
Such modified types already made are recorded so that duplicates
are not made. */
-extern tree build_type_attribute_variant (tree, tree);
+extern ttype build_type_attribute_variant (ttype, tree);
extern tree build_decl_attribute_variant (tree, tree);
-extern tree build_type_attribute_qual_variant (tree, tree, int);
+extern ttype build_type_attribute_qual_variant (ttype, tree, int);
/* Return 0 if the attributes for two types are incompatible, 1 if they
are compatible, and 2 if they are nearly compatible (which causes a
@@ -3914,7 +3914,7 @@ extern tree get_qualified_type (tree, int);
/* Like get_qualified_type, but creates the type if it does not
exist. This function never returns NULL_TREE. */
-extern tree build_qualified_type (tree, int);
+extern ttype build_qualified_type (ttype, int);
/* Create a variant of type T with alignment ALIGN. */