Re: A good compiler



On Thu, 26 Jul 2007 22:59:53 +0530, in comp.lang.c , santosh
<santosh.k83@xxxxxxxxx> wrote:

Kelsey Bjarnason wrote:

Excuse me? A compiler that makes me jump through hoops just to compile
_correct_ code without whining and bitching? It's broken. Badly, badly
broken.

That's just your opinion.

Not /just/ his opinion.

The C Standard explicitly permits implementations
to emit as many diagnostics as they deem fit, over and above what are
required by it.

Sure - but I suspect most people here would agree that any compiler
that emits diagnostics with valid code is screwed up.

Otherwise where do we draw the line ?

warning: "int" - you should use either short or long (or possibly long
long) as the size of an int is platform dependent and your code will
be hosed when you port to a 128-bit platform..

warning: 's' - you do realise this has different sizes in C and C++

warning: 'C' - this is a Fortran comment indicator, your code will
break if you crosscompile with Fortran

warning: "scunthorpe" - this identifier is obscene, reporting you to
the VGTF and Interpol

warning: "tee" - ambiguous identifier: darjeeling or lapsang ?

fatal: "windows" - this word is copyright, deleting your source code




--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
.



Relevant Pages

  • Re: A good compiler
    ... That's just your opinion. ... to emit as many diagnostics as they deem fit, ... I thought the "safe" extensions to Standard library functions ... the warnings almost verge on the edge of been adverts. ...
    (comp.lang.c)
  • Re: The Psychology of Responding to Crackpots
    ... > The program is required to emit at least one ... > disgnostic for every program that hangs, ... KB of diagnostics for every program. ... that is flawless is analyzed as to exactly why it is ...
    (sci.logic)
  • Re: When to emit diagnistics
    ... lcc-win doesn't emit any diagnostic in normal mode, ... emit a diagnostic with the higher warning level. ... It emits a diagnostic only in the highest warning level: ... The problem is that if the compiler emits too many diagnostics ...
    (comp.lang.c)
  • Re: When to emit diagnistics
    ... emit a diagnostic with the higher warning level. ... It emits a diagnostic only in the highest warning level: ... the output of the compiler. ... The problem is that if the compiler emits too many diagnostics ...
    (comp.lang.c)
  • When to emit diagnistics
    ... lcc-win doesn't emit any diagnostic in normal mode, ... emit a diagnostic with the higher warning level. ... It emits a diagnostic only in the highest warning level: ... The problem is that if the compiler emits too many diagnostics ...
    (comp.lang.c)