This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


sk@nvg.unit.no (Steinar Knutsen) writes:

> The problem described below was caused by my misplacing a bracket in
> the C-part of the code.  As my Python-trained brain only looked at the
> indentation, the error was easily missed. Remind me to flame the next
> guy who claims indentation is brittle and brackets are robust. :)

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.

P.S. - Copy sent to bug-gcc, in hope someone in there will agree :-).
I tried to convince Richard a few times in the past years, and suggested
various heuristics, but I probably did not succeed at raising his interest.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]