Subject: Re: CVS commit: syssrc/sys/arch/pmax/pmax
To: None <source-changes@netbsd.org>
From: Dieter Baron <dillo@danbala.ifoer.tuwien.ac.at>
List: source-changes
Date: 12/01/2001 15:22:36
In article <3C08E0F9.96A78CC2@augustsson.net> Lennart wrote:
: Robert Elz wrote:

:> No it isn't
:>
:>         #undef thing
:>
:>         #if thing > 1
:>
:> has always been interpreted as "#if 0 > 1"

: Yes, it has always worked in Unix based cpp.  It is still abuse. :-)
: (It hasn't always worked in other cpps.)

  ANSI C and C99 say it isn't abuse:

ANSI: 3.8.1 Conditional Inclusion
C99: 6.10.1 Conditional Inclusion

	[...]

       [#3] Prior to evaluation, macro invocations in the  list  of
       preprocessing   tokens  that  will  become  the  controlling
       constant expression are replaced  (except  for  those  macro
       names  modified  by  the defined unary operator), just as in
       normal text.  [...] After all
       replacements due to macro expansion and  the  defined  unary
       operator  have been performed, all remaining identifiers are
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       replaced with the pp-number 0, and then  each  preprocessing
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       token  is  converted  into  a  token.  [...]

						yours,
						dillo