[Top][All Lists]

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

Preprocessor requirements for gperf "K&R" output

From: Hrvoje Niksic
Subject: Preprocessor requirements for gperf "K&R" output
Date: Thu, 19 Jun 2003 15:43:41 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030613

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. Incompatibilities like that are why older programs prefer to write

#if foo
# if bar
#  if baz
... blah ...
#  endif
# endif

to the simpler "#if foo && bar && baz" variant.

I propose that in "K&R" output mode the non-ASCII safeguard be removed. Gperf has lived without it for years, and the people who really need K&R output (which is not the default anyway) will probably value portability more than (this kind of) correctness.

Thanks for your consideration.

reply via email to

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