Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!stc!erik From: erik@tcom.stc.co.uk (Erik Corry) Newsgroups: comp.lang.c Subject: preprocessor bug Message-ID: <1982@jura.tcom.stc.co.uk> Date: 12 Sep 90 14:31:57 GMT References: <31530015@hpcvia.CV.HP.COM> <141513@sun.Eng.Sun.COM> Reply-To: erik@htc2.UUCP (Erik Corry) Organization: STC Telecomms, Harlow Technical Centre, Harlow Lines: 24 In article <141513@sun.Eng.Sun.COM> eager@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.)