https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112841
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Summary|typeof_unqual is not |typeof_unqual is not |removing qualifiers from |removing qualifiers from |array types |the element type of array | |types Last reconfirmed| |2023-12-04 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Hmm, 6.7.3/10 "If the specification of an array type includes any type qualifiers, both the array and the element type are so-qualified." and the note 166 notes that this can happen with typedefs ... But then typeof_unqual only mentions the about the type qualifer of the array and not the element type but the example is showing it means the element type of the array should be unqualified too ... I am suspecting if we are pedantic about the language used, this would be a defect in the standard where the typeof_unqual does not mention the `element type` when it should as the example intends it as such. Note GCC does not try to remove qualifiers from the element type because of this quirk in the language of the standard dealing with array types ... Confirmed at least GCC is not following the example in the standard ...