diff options
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/c-common.c | 4 |
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) { |
