diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-04-28 02:04:00 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-04-28 02:04:00 +0000 |
commit | a649660541ce3fca70e523b27aab11d075177183 (patch) | |
tree | 37ccbf8c351589377256b6719735a0acdf478867 /gcc/c-common.c | |
parent | d8b2fb5235d3e0a986da4ce3d642d33e7680b5c8 (diff) | |
download | gcc-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/c-common.c')
-rw-r--r-- | gcc/c-common.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |