[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Portability of preprocessor directives
From: |
Paul Eggert |
Subject: |
Re: Portability of preprocessor directives |
Date: |
10 Mar 2003 12:33:00 -0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3 |
"Paul D. Smith" <address@hidden> writes:
> I'm interested even in compilers that might have shipped prior to the
> last decade, if they're used, but I'm not interested in compilers that
> no one uses anymore for any practical work.
In that case, my summary in
<http://mail.gnu.org/archive/html/autoconf/2003-02/msg00145.html>
should be pretty close to what you wanted.
> being allowed to use #elif would be a HUGE benefit to simplifying the
> GNU make code
Most real C compilers had #elif support added in the late 1980s, as it
was already in System V and was in an early draft of the C standard.
For example Arnold Robbins added #elif to the 4.3BSD C preprocessor in 1986:
<http://groups.google.com/groups?selm=235%40mirror.UUCP>
There was a serious bug in the 2BSD implementation of #elif that
wasn't fixed until a couple of years ago; see
<http://groups.google.com/groups?selm=GL69vL.5Hr%40moe.2bsd.com>.
However, GNU make can't possibly run on a PDP-11 (it's too large) so I
wouldn't worry about that.
> Without elif the logic gets _considerably_ more messy and difficult to
> maintain.
I'd use #elif, then. There's no practical reason not to, these days,
and the maintenance advantage that you mention outweighs any potential
disadvantages of not being able to port to a VAX-11/780 in some
computer museum somewhere.
- Re: Portability of preprocessor directives, Paul D. Smith, 2003/03/09
- Re: Portability of preprocessor directives,
Paul Eggert <=
- Re: Portability of preprocessor directives, Thomas Dickey, 2003/03/10
- Re: Portability of preprocessor directives, Paul Eggert, 2003/03/10
- Re: Portability of preprocessor directives, Earnie Boyd, 2003/03/10
- Re: Portability of preprocessor directives, Thomas Dickey, 2003/03/10
- Re: Portability of preprocessor directives, Earnie Boyd, 2003/03/11
- Re: Portability of preprocessor directives, Thomas Dickey, 2003/03/11
- Re: Portability of preprocessor directives, Andreas Buening, 2003/03/11
- Re: OT - Packages maintaining source for systems no longersupported [WAS: Re: Portability of preprocessor directives], Earnie Boyd, 2003/03/12
- Re: OT - Packages maintaining source for systems no longersupported [WAS: Re: Portability of preprocessor directives], Thomas Dickey, 2003/03/12
- Re: OT - Packages maintaining source for systems no longersupported [WAS: Re: Portability of preprocessor directives], Earnie Boyd, 2003/03/12