Re: "Strong typing vs. strong testing"



On 10/1/2010 2:28 AM, TheFlyingDutchman wrote:

in C I can have a function maximum(int a, int b) that will always
work. Never blow up, and never give an invalid answer. If someone
tries to call it incorrectly it is a compile error.

I would agree that the third sentence is arguably wrong, simply
because there's no such thing (outside #error) of a mandate to stop
compiling. However, my understanding was that the dispute was over
the second sentence, and that's certainly correct.

Why do you consider the term "compile error" a "mandate to stop
compiling"? What do you say to refer to the situation when you have a
statement in your program that the compiler finds is an error? And is
it really material whether the compiler flagged an error and stopped,
or flagged an error and looked for additional errors???

For the purpose of the argument, I do not think it matters whether the compiler looks for additional errors before it stops compiling. More to to point is whether or not it eventually produces an object file that can be linked into an executable file. 'Compile error' (as opposed to 'compile warning') should mean that it does not.

--
Terry Jan Reedy

.



Relevant Pages

  • Re: How do linkers work?
    ... the object file is probably the same as the ... does not hold since all source files are thrown together. ... you cannot get any of the traditional compile errors from the ... You're trying to claim that one is separate compilation, ...
    (comp.lang.c)
  • Re: Kbuild Makefile output
    ... Now I have created single makefile to compile all this ... But now the problem is lots of file included in kernel ... Previously in 2.4 we use to put all output object file ...
    (Linux-Kernel)
  • Re: Turn libc.so into an ld script
    ... SSP support into ports this year. ... function in the object file at compile time (contrary to only ... may have such broken DSO. ...
    (freebsd-hackers)
  • Re: how to force recompile?
    ... >that deletes the object file of the cpp file I always want to compile. ... the source file _was_ recompiled. ... >I can accomplish my task some other way? ...
    (microsoft.public.windowsce.app.development)
  • Re: fork/pipe code in gcc c
    ... to correct the problem you can reorder to command ... But this is what I get when I compile ... > link a object file testb to the object file that results from ...
    (comp.unix.programmer)