Programming language failings [was Re: strangest systems I've sent email from]

Chris Hanson cmhanson at eschatologist.net
Sat Apr 30 14:28:35 CDT 2016


On Apr 30, 2016, at 11:43 AM, Diane Bruce <db at db.net> wrote:
> 
> We cannot use the same outdated ideas we used to use for 'C'
> that we used 40 years ago today. Compilers have improved.
> Know your tools. And that's all I have said. 

In support of this, I’d encourage everyone who works with C to read Chris Lattner’s “What Every C Programmer Should Know About Undefined Behavior” series from the LLVM blog:

    http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html
    http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_14.html
    http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_21.html

C has fairly well-defined semantics, they just aren’t necessarily what you think they are, and optimizers are taking advantage of them (under the “as if” rule) such that a developer’s idea of what assembly a specific section of C code should generate is not all that accurate these days.

  -- Chris



More information about the cctalk mailing list