On Tue, 16 Sep 2014, Bernd Schmidt wrote: > > It's not an implementation detail, it's how TR 18037 defines them, and > > thus how the C front end should represent them in order to follow the > > requirements of TR 18037. > > My position is that standards do not mandate how our internal data structures > should look like, and we should be striving to make them consistent. That
My position is that the structures in the front end should correspond to how the language is actually defined, so that the most obvious way of accessing some property of an entity in the front end actually gets that property as it is defined in the standard, and not something similar but confusingly different defined by GCC. It's the job of genericizing / gimplifying to convert from structures that closely correspond to the source program and the language standard into ones that are more convenient for language-independent processing and code generation. (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.) -- Joseph S. Myers jos...@codesourcery.com