Comment 2 for bug 911871

Revision history for this message
Colin Watson (cjwatson) wrote :

This looks correct to me. "i" requires the operand to be a compile-time constant. In general, the memory location of a multi-dimensional array in C isn't constant at compile-time. Now, as it happens, for ((char *) &sb_sample_f[1][0][0] - (char *) &sb_sample_f[0][0][0]) to be particularly meaningful probably requires the array to be declared directly rather than dynamically
allocated, so in practice that *difference* probably is a constant; but proving that requires the compiler to reason across function boundaries in quite complex ways.

Changing this to "r" looks sensible to me.