Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!microsoft!johnsc From: johnsc@microsoft.UUCP (John Schwabacher) Newsgroups: comp.lang.c Subject: Re: Standard Clarification Message-ID: <8189@microsoft.UUCP> Date: 24 Oct 89 18:15:21 GMT References: <20974@gryphon.COM> <1150@crdos1.crd.ge.COM> <23218@cup.portal.com> <1989Oct21.233915.23217@utzoo.uucp> Reply-To: johnsc@microsoft.UUCP (John Schwabacher) Organization: Microsoft Corp., Redmond WA Lines: 26 In article <1989Oct21.233915.23217@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: }In article <23218@cup.portal.com> Tim_CDC_Roberts@cup.portal.com writes: }> ... ["#define d define" example removed] }>MSC complains that "d" is an unknown preprocessor directive and aborts. }>Does the standard require that this construct should compile correctly? } ... [ANSI spec removed] }In other words, ANSI C specifically says that it *doesn't* work. } }> #define abcde getchar }> ... }> ch = abcde(); }> }>The preprocessor substituted 'getchar' for 'abcde', but then failed to }>expand the 'getchar()' macro from stdio... } }Unless I have missed some fine point, your preprocessor is wrong again. }This is legal. } Wait a minute. "Wrong again"? You just said MSC got the first one right. When I tried the "#define abcde getchar" using MSC 5.10, it worked fine. I don't have 5.0 handy, so I can't say about that. *None* of the Obscure C contest winners that I tried to build under Xenix worked correctly. Bummer.