[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gperf-bugs] Preprocessor requirements for gperf "K&R" output
From: |
Bruno Haible |
Subject: |
Re: [Gperf-bugs] Preprocessor requirements for gperf "K&R" output |
Date: |
Thu, 19 Jun 2003 19:14:59 +0200 |
User-agent: |
KMail/1.5 |
Hi,
Hrvoje Niksic wrote:
> Gperf C output emits a preprocessor safeguard against running on
> non-ASCII character sets. Although the code is valid ISO C, I'm
> concerned that older preprocessors will not be able to parse it. For
> example, I remember that the preprocessor that came with Ultrix had
> problems with complex preprocessor expressions.
I'll deal with this possible problem when someone has verified that
it is a problem. Neither you nor I apparently have access to an Ultrix
machine; if noone uses Ultrix or a similarly old system then the
issue is moot.
> Incompatibilities like
> that are why older programs prefer to write
>
> #if foo
> # if bar
> # if baz
> ... blah ...
> # endif
> # endif
> #endif
>
> to the simpler "#if foo && bar && baz" variant.
We have been using "#if foo && bar && baz" in GNU for at least 12 years,
and are not getting bug reports about it.
> I propose that in "K&R" output mode the non-ASCII safeguard be removed.
> Gperf has lived without it for years
This is not a good suggestion, because a significant percentage of these
very old systems was not using ASCII (but EBCDIC and other charsets).
The lack of a safeguard has been a bug for years.
Bruno