This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A comment-finding hack for hppa I found useful


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]