Was there a very early C βstandardβ where the following was legal for defining a two-dimensional array?
int array[const_x, const_y]; int array2[2, 10];
I stumbled upon old legacy code that uses this (and only that) notation for multidimensional arrays. The code, with the exception of this oddity, works great for C (and is surprisingly well-designed for the time).
Since I did not find macros that convert between [,] and [][] , and I assume this is not a form of practical joke, it seems that there was once your old C compiler that accepted this notation. Or am I missing something?
Edit: If this helps, this is for embedded microcontrollers (atmel). From experience, I can say that embedded compilers are not so well known for standard compliance.
The code on current compilers works as intended (as far as you can guess from the names of functions, descriptions, and variables) if I change everything [,] to [][] .
vsz
source share