This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
TYPE_MAIN_VARIANT of arrays of qualified type
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 28 Jan 2005 19:01:46 +0000 (UTC)
- Subject: TYPE_MAIN_VARIANT of arrays of qualified type
Should the TYPE_MAIN_VARIANT of an array of qualified element type be an
array of unqualified element type? For example, should the
TYPE_MAIN_VARIANT of "const char[1]" be "char[1]"?
Some parts of the C front end make it so. Some act as if they are trying
to make it so but fail to do so. Some make no attempt to make it so.
Some break when it is so. And I have a bootstrap comparison failure where
the output of the stage1 and stage2 compilers differs in whether an array
is described as "const array of char" or "const array of const char" in
the DWARF2 output (when the actual C type is "array of const char") which
makes it seem necessary to clean this up.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)