Silly brackets (Was: Re: Problems extending Python with C.)

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sun Feb 20 03:03:00 GMT 2000


> I believed, for years, that C compilers should have an option to
> emit warning diagnostics when indentation is not consistent with
> brackets.  It is a big waste, in my opinion, that compilers ignore
> all that redundancy, while it could be used to better help
> programmers.

One of the problems is that C uses a preprocessor, which often does
funny things to indentation, making the notion of column number
meaningless to preprocessor output. Combine this with the common
approach of implementing the preprocessor as a separate process, and
you'll see that what you want is very hard to implement.

That, of course, says nothing whether it would be desirable to have
such a feature. I'm quite certain that you'd get *a lot* of warnings
for most of today's code.

Regards,
Martin



More information about the Gcc-bugs mailing list