This is the mail archive of the
mailing list for the GCC project.
Re: TYPE_MAIN_VARIANT of arrays of qualified type
- From: Devang Patel <dpatel at apple dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 28 Jan 2005 11:15:07 -0800
- Subject: Re: TYPE_MAIN_VARIANT of arrays of qualified type
- References: <Pine.LNX.firstname.lastname@example.org>
On Jan 28, 2005, at 11:01 AM, Joseph S. Myers wrote:
Should the TYPE_MAIN_VARIANT of an array of qualified element type be
array of unqualified element type? For example, should the
TYPE_MAIN_VARIANT of "const char" be "char"?
Some parts of the C front end make it so. Some act as if they are
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
the output of the stage1 and stage2 compilers differs in whether an
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")
makes it seem necessary to clean this up.
This is not an answer to your questions but see bugzilla PR/8354
for related info. I tried to fix 8354 but Jim provided good
analysis while rejecting my incorrect patch. Later, we (Apple)
lost immediate interest in DWARF so I did not pursue it further.