Joseph S. Myers wrote:-

> On Sun, 7 May 2006, Neil Booth wrote:
> 
> > For the composite type, 6.2.7p3 dash 1 applies, and the composite is
> > the VLA type.  That VLA type is derived indirectly from an incomplete
> > type, and hence subscripting that incomplete type falls foul of the
> > contraint on the subscript operator.
> > 
> > I believe your example is the same, just with an extra level of nesting
> > from the nested conditional expression.
> > 
> > If you disagree could you point out the error in my reasoning?
> 
> I believe that "These rules apply recursively to the types from which the 
> two types are derived." means that the composite of T1[variable] and T2[] 
> is not T1[variable] but (composite(T1,T2))[variable].  I do not think 
> interpreting "is that type" to override the recursivity makes sense, 
> because it would yield self-contradictory results for the composite type 
> of two VLA types which are compatible but not the same.

Well, the language is clearly different.  For the known constant
size case it doesn't say "that type" it says "array of that size".
Had your reading been intending it could just as well say "array of
that size" for a VLA case, and even collapse the wording.  It doesn't,
however, it explicitly separates them and says "that type".

This may just be poor wording, but games with precise reading are used
to justify treating "void" differently from "qualified void" so I'm
generally inclined to take the standard's wording literally.  It
appears EDG independently read it that way too.

Neil.

Reply via email to