This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Convert 3.2 sources to ISO C90
- From: Nathanael Nerode <neroden at doctormoo dot dyndns dot org>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 6 Jun 2002 12:51:00 -0400
- Subject: Re: Convert 3.2 sources to ISO C90
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