Hi, Ian Lance Taylor <i...@google.com> skribis:
> ludovic.cour...@inria.fr (Ludovic Courtès) writes: > >>> Perhaps something like >>> >>> extern void foo (int a, int x[__attribute__ ((dim (a)))]) >>> >>> could be implemented. >> >> Why use special syntax for this? It seems to me that ‘int x[a]’ conveys >> the exact same information. > > Using special syntax permits programmers to use the preprocessor to > write code that will work both when using versions of gcc that support > this extension and when using versions of gcc, or other compilers > entirely, that do not support it. Declaring the parameter above as ‘int x[a]’ is valid C99. I fail to see why this is insufficient for the purposes we discussed. Could you clarify? Thanks, Ludo’.