On Wed, 17 Sep 2014, Bernd Schmidt wrote:

> On 09/16/2014 11:18 PM, Joseph S. Myers wrote:
> 
> > (That TYPE_MAIN_VARIANT maps an array of qualified type to an array of
> > corresponding unqualified type necessitates lots of special cases in the
> > front end to avoid applying TYPE_MAIN_VARIANT to array types, since in C
> > terms array types are always unqualified and are unrelated to an array of
> > corresponding unqualified element type.)
> 
> Sounds like you want a c_type_main_variant wrapper then? What exactly breaks
> if you ignore the problem and apply TYPE_MAIN_VARIANT to arrays?

Anything where the C standard defines something in terms of the 
unqualified versions of types, or the set of qualifiers on a type, 
operates incorrectly (tests compatibility of the wrong types, etc.) if you 
apply TYPE_MAIN_VARIANT to arrays.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to