Was there a very early C "standard" where the following was legal for the definition of a two-dimensional array?
int array[const_x, const_y];
int array2[2, 10];
I've stumbled upon some old legacy code which uses this (and only this) notation for multi-dimensional arrays. The code is, except for this oddity, perfectly valid C (and surprisingly well-designed for the time).
As I didn't find any macros which convert between [,]
and [][]
, and I assume it's not a form of practical joke, it seems that once upon a time there hath been thy olde C compiler which accepted this notation. Or did I miss something?
Edit: If it helps, it's for embedded microcontrollers (atmel). From experience I can tell, that embedded compilers are not that well-known for standard-compliance.
The code on current compilers works as intended (as far as it can be guessed from the function names, descriptions and variables) if I change all [,]
to [][]
.