Summary: | enum variable operation behaviour and -O2 | ||
---|---|---|---|
Product: | gcc | Reporter: | john spelis <john.spelis> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | gcc-bugs, jason |
Priority: | P3 | ||
Version: | 4.3.0 | ||
Target Milestone: | --- | ||
Host: | i686-pc-linux-gnu | Target: | i686-pc-linux-gnu |
Build: | i686-pc-linux-gnu | Known to work: | |
Known to fail: | Last reconfirmed: |
Description
john spelis
2008-05-07 15:01:33 UTC
And C++ standard says if the value is out of range of the enum, the behavior is undefined so this is not a bug. Subject: Re: enum variable operation behaviour and -O2
Thanks for ending that issue.
Best Regards
On 7 May 2008, pinskia at gcc dot gnu dot org wrote:
>
>
> ------- Comment #1 from pinskia at gcc dot gnu dot org 2008-05-07 17:23 -------
> And C++ standard says if the value is out of range of the enum, the behavior is
> undefined so this is not a bug.
>
>
> --
>
> pinskia at gcc dot gnu dot org changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|UNCONFIRMED |RESOLVED
> Resolution| |INVALID
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36170
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
In G++ 4.6 the surprising optimization will only be performed with -fstrict-enums. |