Re: behavior-preserving optimization in C, was compiler bugs

Robert A Duff <bobduff@shell01.TheWorld.com>
Tue, 19 May 2009 20:58:07 -0400

          From comp.compilers

Related articles
[13 earlier articles]
Re: behavior-preserving optimization in C, was compiler bugs mcintosh@cup.hp.com (Nathaniel McIntosh) (2009-05-16)
Re: behavior-preserving optimization in C, was compiler bugs pertti.kellomaki@tut.fi (Pertti Kellomaki) (2009-05-18)
Re: behavior-preserving optimization in C, was compiler bugs gah@ugcs.caltech.edu (glen herrmannsfeldt) (2009-05-18)
Re: behavior-preserving optimization in C, was compiler bugs torbenm@pc-003.diku.dk (2009-05-19)
Re: behavior-preserving optimization in C, was compiler bugs torbenm@pc-003.diku.dk (2009-05-19)
Re: behavior-preserving optimization in C, was compiler bugs gneuner2@comcast.net (George Neuner) (2009-05-19)
Re: behavior-preserving optimization in C, was compiler bugs bobduff@shell01.TheWorld.com (Robert A Duff) (2009-05-19)
Re: behavior-preserving optimization in C, was compiler bugs bobduff@shell01.TheWorld.com (Robert A Duff) (2009-05-19)
Re: behavior-preserving optimization in C, was compiler bugs anton@mips.complang.tuwien.ac.at (2009-05-21)
Re: behavior-preserving optimization in C, was compiler bugs anton@mips.complang.tuwien.ac.at (2009-05-21)
Re: behavior-preserving optimization in C, was compiler bugs anton@mips.complang.tuwien.ac.at (2009-05-21)
Re: behavior-preserving optimization in C, was compiler bugs anton@mips.complang.tuwien.ac.at (2009-05-21)
Re: behavior-preserving optimization in C, was compiler bugs bear@sonic.net (Ray) (2009-05-21)
[8 later articles]
| List of all articles for this month |
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Newsgroups: comp.compilers
Date: Tue, 19 May 2009 20:58:07 -0400
Organization: The World Public Access UNIX, Brookline, MA
References: 09-04-072 09-04-086 09-05-010 09-05-022 09-05-028 09-05-038 09-05-039 09-05-050 09-05-055 09-05-065 09-05-069
Keywords: optimize, debug
Posted-Date: 20 May 2009 09:59:05 EDT

anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:


> "Christopher Glaeser" <cdg@nullstone.com> writes:
>>Even a simple bug fix to a new release in a compiler
>>can affect the behavior of C programs that have undefined behavior.
>
> Different releases are a different issue than turning optimization on,
> although changing behaviour between releases is not desirable, either.


What about portability to a completely different compiler on a
completely different machine? Do you expect your program to behave
the same?


I think you're attacking the wrong folks, here. If optimizers can
affect the behavior of programs, that's primarily the fault of the
language designer, not the compiler writer.


Language designers ought to minimize such cases. Ada has fewer cases of
undefined behavior than C. Java has even fewer.


- Bob



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.