News for hackers. Stuff that matters.
Re:What every compiler writer should know about programmers ... by eru on Thursday March 03, 2016 @07:00PM (#11221021)
Just use a more defined language than C..
Re:What every compiler writer should know about programmers ... by ScottBurson on Thursday March 03, 2016 @10:34PM (#11221909)
Yes. I think, if I had to do embedded work, I would use Ada.
Re:What every compiler writer should know about programmers ... by klibertp on Friday March 04, 2016 @10:44AM (#11224446)
I immediately thought about the same language. It's clean, safe, fast and explicit, even if a bit verbose. With a quite nice compiler, last time I checked (some 10 years ago), and without "undefined behaviour".
Re:What every compiler writer should know about programmers ... by eru on Thursday March 03, 2016 @11:06PM (#11221993)
Or even use an explicit C-like dialect that defines more things, if you like the syntax.
Re:What every compiler writer should know about programmers ... by conceit on Thursday March 03, 2016 @07:38PM (#11221161)
Optimally a compiler's version of a language is better defined simply by it's definitions. It's just problematic if the behavior is changed between versions, eg. for the sake of optimizations. It's also bad if undefined behavior is expected to be reliable where the original implementation wasn't intended to be meaningful in the first place.

If those two cases are hard to tell apart, the process of announcing this is at fault, I guess, e.g. the error messages and warnings, the documentation, the info hidden in discussions on the mailinglists or in bug reports, but the gcc docs seem fairly extensive and I can't claim to have read it completely or the c standard.