On 18 Mar 2016, at 10:33pm, Scott Robison <scott at casaderobison.com> wrote:

> I'd rather have code that might use some "undefined behavior" and generates
> the right answer than code that always conformed to defined behavior yet
> was logically flawed. Mind you, I don't often have to worry about my code
> being compiled in a huge number of environments.

That's the problem.

The development team don't know what compilers their code is going to be 
compiled on.  They can argue that a compiler which violates /documented/ 
behaviour is broken.  But they can't argue that a compiler which correctly 
compiles C code is broken.  There is, by definition, nothing wrong with such a 
compiler and if it causes your code to do The Wrong Thing then your code is 
broken.

However nobody has come up with such a compiler.  Someone could write one, I 
suppose[1].  Then they'd compile SQLite with it.  Then they'd find a test case 
which caused SQLite to do The Wrong Thing.  Then they'd submit a bug report.  
Until that has happened, nobody has proved there's anything wrong with SQLite.

Frankly the fact that I can take a cross-compiler for an embedded processor in 
... say, a smart thermostat ... compile the amalgamation version on it and be 
sure it's going to work is very pleasing.

Simon.

[1] Or find an open source compiler and make some simple modifications to it.

Reply via email to