What is a constant expression

Norman Diamond diamond at csl.sony.co.jp
Thu Oct 19 11:39:47 AEST 1989


In article <1219 at crdos1.crd.ge.COM> davidsen at crdos1.UUCP (bill davidsen) writes:

>	#define CNTL(c) ('c' & 037)
>While this work fine with pcc, the ANSI preprocessor doesn't expand it.

Another way around it is to edit all the calls to CNTL(c) to look like
CNTL('c'), which isn't too difficult a change.  Then the macro depends
on neither Reiser nor ANSI stringizing, and the expression is obviously
constant.  (Uh, obviously, obviously, hmm, can't find "obviously" in the
index to the draft standard, bet someone will bite us on this too.)

-- 
Norman Diamond, Sony Corp. (diamond%ws.sony.junet at uunet.uu.net seems to work)
  Should the preceding opinions be caught or     |  James Bond asked his
  killed, the sender will disavow all knowledge  |  ATT rep for a source
  of their activities or whereabouts.            |  licence to "kill".



More information about the Comp.std.c mailing list