aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorRichard Earnshaw <erich@gnu.org>1994-07-06 09:07:10 +0000
committerRichard Earnshaw <erich@gnu.org>1994-07-06 09:07:10 +0000
commit20250c072b934afe6194fdb4611e78f549465689 (patch)
treedbea491d70772c88dc04e6a40611d1d48d3f8b55 /gcc/c-common.c
parent515dfc7a237bc1f02b23e12b004937800f21a5a3 (diff)
downloadgcc-20250c072b934afe6194fdb4611e78f549465689.zip
gcc-20250c072b934afe6194fdb4611e78f549465689.tar.gz
gcc-20250c072b934afe6194fdb4611e78f549465689.tar.bz2
(decl_attributes): If TREE_TYPE for the DECL is updated,
then update TYPE as well. From-SVN: r7662
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 920c73d..f18c270 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -232,7 +232,7 @@ decl_attributes (decl, attributes)
TREE_THIS_VOLATILE (decl) = 1;
else if (TREE_CODE (type) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE)
- TREE_TYPE (decl)
+ TREE_TYPE (decl) = type
= build_pointer_type
(build_type_variant (TREE_TYPE (type),
TREE_READONLY (TREE_TYPE (type)), 1));
@@ -246,7 +246,7 @@ decl_attributes (decl, attributes)
TREE_READONLY (decl) = 1;
else if (TREE_CODE (type) == POINTER_TYPE
&& TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE)
- TREE_TYPE (decl)
+ TREE_TYPE (decl) = type
= build_pointer_type
(build_type_variant (TREE_TYPE (type), 1,
TREE_THIS_VOLATILE (TREE_TYPE (type))));