diff options
author | Andrew Haley <aph@redhat.com> | 2000-11-15 14:39:14 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2000-11-15 14:39:14 +0000 |
commit | 12e1243e426a12358e793cef2735e77c37452ec7 (patch) | |
tree | 125e489e2c90a52e691eac99b293650f052b66f7 /gcc/c-common.c | |
parent | 71631a1f1ce6cba9b823cb48a2bff17e97e2664f (diff) | |
download | gcc-12e1243e426a12358e793cef2735e77c37452ec7.zip gcc-12e1243e426a12358e793cef2735e77c37452ec7.tar.gz gcc-12e1243e426a12358e793cef2735e77c37452ec7.tar.bz2 |
tree.c (build_type_no_quals): New function.
2000-11-13 Andrew Haley <aph@redhat.com>
* tree.c (build_type_no_quals): New function.
* tree.h (build_type_no_quals): Declare.
* c-common.c (c_get_alias_set): When considering type
compatibility for pointer types, ignore cv-qualifiers anywhere in
a pointer chain.
From-SVN: r37479
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index e0d8a45..50620f0 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -4794,9 +4794,7 @@ lang_get_alias_set (t) can dereference IPP and CIPP. So, we ignore cv-qualifiers on the pointed-to types. This issue has been reported to the C++ committee. */ - t1 = TYPE_MAIN_VARIANT (TREE_TYPE (t)); - t1 = ((TREE_CODE (t) == POINTER_TYPE) - ? build_pointer_type (t1) : build_reference_type (t1)); + t1 = build_type_no_quals (t); if (t1 != t) return get_alias_set (t1); } |