Convert 3.2 sources to ISO C90
Nathanael Nerode
neroden@doctormoo.dyndns.org
Thu Jun 6 09:59:00 GMT 2002
Stan Shebs said:
> That code would be more readable if you didn't have to have all
> the PARAMS and the VA_FIXEDARGS and the like, eh?
Law said:
> That stuff is pretty trivial. Do you think the really affect the
> readablity of the code that much?
I say, YES. They affect the readablity of the code a LOT.
Just allowing ordinary ISO prototypes, and defining function
arguments ISO-style, would add a lot of readability. There's a *reason*
ANSI choose to do things the way they did; it's *inherently* more
readable than the K&R syntax, let alone the bizarre double syntax GCC
uses.
This doesn't even necessarily mean totally losing K&R compilability,
since we can always tell people to run ansi2knr. :-P
Most of the other rules regarding K&R compatibility in C proper (no
unary +, no 'signed', have to use 'PTR', must cast enums to ints, etc.)
do not really impede readability. The different integer promotion
rules are irritating, but encourage people to write their promotions
explicitly, which can be good. The macro concatenation and
stringification rules actually improve readability in some cases.
But the Byzantine method of declaring functions stinks.
--Nathanael
More information about the Gcc
mailing list