strip array element qualifiers too.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31849
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
/* 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)
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);
}