Newsgroups: comp.sys.encore
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!news
From: mlevin@jade.tufts.edu
Subject: A bug in Umax 4.3 cc's treatment of -D option?
Message-ID: <1991Jun21.155927.24995@athena.mit.edu>
Sender: news@athena.mit.edu (News system)
Organization: Me, Myself, and I, inc.
Distribution: usa
Date: Fri, 21 Jun 91 15:59:27 GMT
Lines: 20

The following program, when compiled on a Multimax running Umax 4.3,
as follows: "cc -DDEF=BB a.c"

main()
{
  enum {AA, BB, CC} dd;
  dd = DEF;
#if DEF!=CC
  printf("%d\n",DEF);
#endif
}

  produces the output "1" - that is, the printf() call is put into the
code by the pre-processor. However, the same program and compilation
command produces no output on either SunOs or VMS C compilers (I have
been told that this is correct - that it should leave the printf()
out). Any information on this?

Mike Levin

