preprocessor bug

Erik Corry erik at tcom.stc.co.uk
Thu Sep 13 00:31:57 AEST 1990


In article <141513 at sun.Eng.Sun.COM> eager at ringworld.Eng.Sun.COM (Michael J. Eager) writes:
>
>The preprocessor is supposed to insert whitespace after the expansion
>of a macro.  If it doesn't and the define is as described, there seems
>to be a preprocessor bug.  
>
Are you sure? The ULTRIX VAX I am using will preprocess:

    #define TRUE -1
    int c;
    c=TRUE;

into

    int c;
    c=-1;

Which gives a compiler warning because it is interpreted as an
old-fashioned version of c-=1. Does this mean the compiler here
is not pcc compliant? Not ANSI compliant? (no surprises there).
Which standard defines the behaviour you describe?

(I am not interested in hearing comments on #define TRUE -1. It
is irrelevant.)



More information about the Comp.lang.c mailing list