This is the mail archive of the
mailing list for the binutils project.
Re: A comment-finding hack for hppa I found useful
- To: Michael Meissner <meissner at cygnus dot com>
- Subject: Re: A comment-finding hack for hppa I found useful
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Thu, 13 Jul 2000 11:11:16 +1000 (EST)
- cc: binutils at sourceware dot cygnus dot com
On Wed, 12 Jul 2000, Michael Meissner wrote:
> > : PS. Question for the language experts. "#if MACRO" or "#ifdef MACRO",
> > : which is preferred? Given MACRO is either undefined or evaluates to 1,
> > : there is no difference really (except I believe some really old compilers
> > : don't even supprt #ifdef)
> At the time of the original C standard was being produced (1984 or 1985 being
> the first meeting), there were no known compilers still in use that did not
> support #ifdef (K&R-1 mentions both #ifdef and #if). I do recall having
> #ifdef's and a preprocessor when I was working on a UNIX V6 system in 1979
> (though you had to make sure the first byte of the file was '#' or else the
> preprocessor was not run, and it had the original wacky structure rules). The
> default compiler on SunOS does support #if name and #if defined(name).
My faulty memory playing tricks again. It's not #ifdef that is missing in
some compilers, it's "#if defined (name)". I even remembered where I saw
this first: nethack include/config.h :-)
Linuxcare. Support for the Revolution.