diff options
author | Nathan Sidwell <nathan@acm.org> | 2000-02-08 11:15:24 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2000-02-08 11:15:24 +0000 |
commit | 2c55cdde2e45feefa3241d4976ffc419d0cad6c4 (patch) | |
tree | 708a4974151fe4a3e85d0131c021ab43c8509056 | |
parent | c4781ce75a783dafc6d946fd7bcf114b1e43f63b (diff) | |
download | gcc-2c55cdde2e45feefa3241d4976ffc419d0cad6c4.zip gcc-2c55cdde2e45feefa3241d4976ffc419d0cad6c4.tar.gz gcc-2c55cdde2e45feefa3241d4976ffc419d0cad6c4.tar.bz2 |
typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to strip array element qualifiers too.
* typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
strip array element qualifiers too.
From-SVN: r31849
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 82faae3..e632672 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2000-02-08 Nathan Sidwell <nathan@acm.org> + + * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to + strip array element qualifiers too. + 2000-02-07 Mark Mitchell <mark@codesourcery.com> * decl.c (store_parm_decls): Don't build cleanups for parameters diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index c9c1085..1ffd7bc 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -7170,7 +7170,8 @@ casts_away_constness (t1, t2) /* Returns TYPE with its cv qualifiers removed TYPE is T cv* .. *cv where T is not a pointer type, - returns T * .. * */ + returns T * .. *. (If T is an array type, then the cv qualifiers + above are those of the array members.) */ static tree strip_all_pointer_quals (type) @@ -7179,5 +7180,5 @@ strip_all_pointer_quals (type) if (TREE_CODE (type) == POINTER_TYPE) return build_pointer_type (strip_all_pointer_quals (TREE_TYPE (type))); else - return strip_top_quals (type); + return TYPE_MAIN_VARIANT (type); } |