Convert 3.2 sources to ISO C90
Daniel Berlin
dberlin@dberlin.org
Wed Jun 5 13:24:00 GMT 2002
On Wednesday, June 5, 2002, at 04:04 PM, Stan Shebs wrote:
> Now that 3.1 is out, and we've flushed lots of old obsolete configs
> from the sources, it's a good time to consider dropping the
> anachronistic requirement that GCC sources be written in K&R C.
>
> Once upon a time, this was the right thing to do; there were many
> systems for which only an ancient C compiler was available, and
> in the absence of effective cross-compilation machinery, it was
> necessary that GCC be compilable by the ancient host compiler.
>
> The situation today is quite different. While there may still be
> hosts for which only a pre-ISO compiler is available from the
> vendor (HPs come to mind), there aren't any that don't already
> have a GCC port, and there is no chance that any new ones will
> materialize in the future.
>
> In fact, the era of K&R compilers is so far past that many of our
> younger developers have never even seen such a compiler, and GCC's
> rules of K&R compatibility are just this mumbo-jumbo that takes
> cycles away from real development. Admittedly, it's not a huge
> cost, but why spend even small amounts of time on something that's
> no longer needed?
>
> So I'd like to formally propose that the K&R compatibility requirement
> be dropped for 3.2, and that patches converting K&R syntax to pure
> ISO be accepted as obvious improvements.
>
I agree completely.
As a datapoint, GDB has required ISO C, rather than K&R C, for a while now, and 0 complaints have been heard so far.
One could always ansi2knr all the files if need be, anyway.
--Dan
> Stan
>
More information about the Gcc
mailing list