aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-04-28 02:04:00 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-04-28 02:04:00 +0000
commita649660541ce3fca70e523b27aab11d075177183 (patch)
tree37ccbf8c351589377256b6719735a0acdf478867 /gcc
parentd8b2fb5235d3e0a986da4ce3d642d33e7680b5c8 (diff)
downloadgcc-a649660541ce3fca70e523b27aab11d075177183.zip
gcc-a649660541ce3fca70e523b27aab11d075177183.tar.gz
gcc-a649660541ce3fca70e523b27aab11d075177183.tar.bz2
c-commom.c (c_apply_type_quals_to_decl): REFERENCE_TYPES are always TREE_READONLY.
* c-commom.c (c_apply_type_quals_to_decl): REFERENCE_TYPES are always TREE_READONLY. From-SVN: r33500
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/c-common.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d97db7a..bc6ff6d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-27 Mark Mitchell <mark@codesourcery.com>
+
+ * c-commom.c (c_apply_type_quals_to_decl): REFERENCE_TYPES are
+ always TREE_READONLY.
+
2000-04-27 Ulrich Drepper <drepper@cygnus.com>
* i386.h (FUNCTION_BLOCK_PROFILER_EXIT): Generate mem reference
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 32b2ede..b699405 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -3217,7 +3217,9 @@ c_apply_type_quals_to_decl (type_quals, decl)
int type_quals;
tree decl;
{
- if (type_quals & TYPE_QUAL_CONST)
+ if ((type_quals & TYPE_QUAL_CONST)
+ || (TREE_TYPE (decl)
+ && TREE_CODE (TREE_TYPE (decl)) == REFERENCE_TYPE))
TREE_READONLY (decl) = 1;
if (type_quals & TYPE_QUAL_VOLATILE)
{