This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Crazy compiler optimization
- From: Ian Lance Taylor <iant at google dot com>
- To: vijay nag <vijunag at gmail dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 9 Oct 2013 10:48:09 -0700
- Subject: Re: Crazy compiler optimization
- Authentication-results: sourceware.org; auth=none
- References: <CAKhyrx_1m0K868TVXg8kwo+EhbB+VFV0RkPqDHJ+FA8BV4w4Gw at mail dot gmail dot com>
On Wed, Oct 9, 2013 at 2:36 AM, vijay nag <vijunag@gmail.com> wrote:
>
> While compiler optimization should guarantee that the result of
> execution is same at all optimization levels,
That guarantee only holds for programs that fully conform to the
language standard and avoid all cases of undefined behaviour.
Ian