11-104r1 To: J3 From: Nick Maclaren/Bill Long Subject: Interop TR: bounds revisited Date: 2011 February 17 Reference: N1838, 10-228 The minutes state that no action was to be taken on 10-228 at meeting 193, which is just as well, because I am afraid that it was erroneous. The situation is significantly worse than it stated. N1838 is complete enough to see how CFI_bounds_t is used, and so this proposes a more radical solution. In summary, the stride member should be removed, as it achieves little useful purpose and would need a lot of work to specify. CFI_cdesc_to_bounds cannot return a useful value for the stride in many cases. CFI_associate also uses a bounds array, and needs to say that the stride member is ignored. Paper 11-123r2 deleted the CFI_cdesc_to_bounds function. With the new set of functions proposed in 11-144, CFI_associate is deleted and the bounds array is no longer needed for anything other than CFI_allocate. In that case, the stride member is not used. However, it is perhaps simpler for programmers if we just change CFI_allocate to have separate lower_bounds and upper_bounds arrays and delete CFI_bounds_t entirely. Edits are provided to do that. Edits to N1838: [11:4-10] Delete 5.2.4 CFI_bounds_t {whole subclause}. [14:Table 5.3] In Table 5.3, delete the entries for CFI_INVALID_UPPER_BOUND and CFI_INVALID_STRIDE and their associated Error descriptions. [15:24] In the title line for 5.2.6.6 int CFI_allocate, replace "const CFI_bounds_t bounds[]" with "const CFI_index_t lower_bounds[], const CFI+index_t upper_bounds[]". [15:29] Replace "The number of elements in the bounds array" with "The number of elements in the lower_bounds and upper_bounds arrays shall be equal and". [15:30] Replace the sentence "The stride values are ignored and assumed to be one." with "The lower_bounds and upper_bounds arrays provide the lower bounds and upper bounds, respectively, for each corresponding dimension of the array." [15:32] Replace "supplied bounds" with "supplied lower and upper bounds".