Re: Debug optimized code (Anton Ertl)
Sat, 04 Oct 2008 13:12:41 GMT

          From comp.compilers

Related articles
[7 earlier articles]
Re: Debug optimized code (George Neuner) (2008-09-20)
Re: Debug optimized code (Hans-Peter Diettrich) (2008-09-21)
Re: Debug optimized code (Stephen Horne) (2008-09-22)
Re: Debug optimized code (George Neuner) (2008-09-23)
Re: Debug optimized code (Walter Banks) (2008-09-25)
Re: Debug optimized code (kamal) (2008-10-01)
Re: Debug optimized code (2008-10-04)
| List of all articles for this month |

From: (Anton Ertl)
Newsgroups: comp.compilers
Date: Sat, 04 Oct 2008 13:12:41 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
References: 08-09-076 08-09-084 08-10-002
Keywords: debug, optimize
Posted-Date: 04 Oct 2008 16:44:56 EDT

kamal <> writes:
> I am not sure when you will hit a case that program behavior got
>altered by a valid optimization strategy -unless you are debugging the
>compler/filing a bug against the compiler vendor instead of the
>application writer.

Nowadays it's pretty easy to hit a case where the behavior of the
program is as intended when you compile without optimization, but is
different when you compile with optimization. Just use C as a source
language and gcc as compiler (and I guess that this also applies to
C++ and some other C and C++ compilers). And the gcc maintainers
don't even consider this as a flaw (and certainly not as a bug) in
their compiler. They will just say that your program has no meaning
because it does not conform to the standard, so they can compile it to
anything they want. One can find at least one violation of the C
standard in virtually every serious C program, so ...

- anton
M. Anton Ertl

Post a followup to this message

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