Public Comment Number PC-UK0043 ISO/IEC CD 9899 (SC22N2620) Public Comment =========================================== Date: 1998-01-14 Author: Clive D.W. Feather Author Affiliation: Self Postal Address: Demon Internet Limited 322 Regents Park Road London N3 2QQ United Kingdom E-mail Address: Telephone Number: +44 181 371 1138 Fax Number: +44 181 371 1037 Number of individual comments: 1 Comment 1. Category: Inconsistency Committee Draft subsection: 6.5.7 Title: Clarify when VLA sizes are determined Detailed description: 6.5.7p3 reads in part: Any array size expression associated with variable length array declarators shall be evaluated with the typedef name at the beginning of its scope upon each normal entry to the block. This wording appears to say that VLA typedefs are evaluated when the block containing them is entered, even though this is not the case for any other kind of declaration (including VLAs themselves). For example: { int n; n = 5; int v1 [n]; n += 2; typedef int vec [n]; n += 2; vec v2; /* ... */ } The above wording would imply that vec, and so v2, contains either 5 or an undefined number of elements, rather than 7 that the average programmer would expect. Change the wording to: Any array size expression associated with variable length array declarators shall be evaluated with the typedef name at the beginning of its scope, and the resulting size shall be used whenever the typedef name is subsequently used.