autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Portability of preprocessor directives


From: Thomas Dickey
Subject: Re: Portability of preprocessor directives
Date: Tue, 25 Feb 2003 15:38:24 -0500
User-agent: Mutt/1.3.27i

On Tue, Feb 25, 2003 at 11:49:17AM -0800, Paul Eggert wrote:
> "Paul D. Smith" <address@hidden> writes:
> 
> > What is the word on portability of preprocessor directives?
> > 
> > I'm in particular thinking of things like "#if defined()",
> > "#elif !defined()", the && and || operators, etc.

taking it out of context, he did ask about pre-ANSI compilers.

both of these comments below are misleading, since there are known
cases for pre-ANSI compilers which violated the rules.
 
> The original traditional C preprocessor did not support #elif, but
> compilers without #elif are long dead and are no longer worth worrying
> about.
> 
> The original traditional C preprocessor required '#' to be in column
> 1.  Typical GNU programs still put '#' in column 1, but I think this
> is now more of a style thing than a requirement.  If you're worried
> about older compilers then it might be best to stick with the style
> for a few years more, anyway.
> 

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]