Are there macros or builtins that can return the length of arrays at compile time in GCC?
For example:
int array[10];
For which:
I wouldn't rely on sizeof since aligment stuff could mess up the thing.
#define COUNT 10 int array[COUNT];
And then you could use COUNT as you want.