Mail Archives: djgpp/1997/02/04/18:31:12
On 3 Feb 1997 00:50:13 GMT, afn03257 AT freenet2 DOT afn DOT org (Daniel P Hudson) wrote:
>
> The GNU C preprocessor has a known bug that is present in 2.7.2.1
>and probably earlier versions.
>
>EX code.
>
>#include <stdio.h>
>#define x 10
>
>int main(void)
>{
> printf("%f\n", .x); // should cause a preprocessor error
> return 0;
>}
>
>It is not real important, however it is an ANSI violation some people
>may want to look into.
No it is an extremely useful feature, for example lets say you change the name
of a structure member then using the #define statement saves you the trouble of
changing the member in a bunch of files (of course that does require that you
not have any variables that are the same name as the member).
Bill Lanam
- Raw text -