Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3081)

Issue 4433083: [google] Add -fno-strict-enum-precision (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years ago by Diego Novillo
Modified:
12 years, 6 months ago
Reviewers:
richard.guenther, pcarlini, froydnj
CC:
silvius.rus_gmail.com, gcc-patches_gcc.gnu.org, jason_redhat.com
Visibility:
Public.

Patch Set 1 #

Patch Set 2 : [google] Add -fstrict-enum-precision flag #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -4 lines) Patch
M gcc/ChangeLog.google-main View 1 chunk +10 lines, -0 lines 0 comments Download
gcc/doc/invoke.texi View 2 chunks +7 lines, -2 lines 0 comments Download
M gcc/gimplify.c View 1 chunk +2 lines, -0 lines 0 comments Download
M gcc/testsuite/ChangeLog.google-main View 1 chunk +6 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/other/no-strict-enum-precision-1.C View 1 chunk +22 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/other/no-strict-enum-precision-2.C View 1 chunk +26 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/other/no-strict-enum-precision-3.C View 1 chunk +14 lines, -0 lines 0 comments Download
M gcc/tree-vrp.c View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 8
Diego Novillo
This patch from Silvius Rus adds a new flag (-fstrict-enum-precision). While porting the patch to ...
13 years ago (2011-04-28 19:50:49 UTC) #1
froydnj_codesourcery.com
On Thu, Apr 28, 2011 at 03:50:45PM -0400, Diego Novillo wrote: > Committed to google/main. ...
13 years ago (2011-04-28 19:56:51 UTC) #2
pcarlini_gmail.com
... are the testcases formatted according to the GNU guidelines, in terms, for example, of ...
13 years ago (2011-04-28 19:57:52 UTC) #3
Diego Novillo
On Thu, Apr 28, 2011 at 15:56, Nathan Froyd <froydnj@codesourcery.com> wrote: > On Thu, Apr ...
13 years ago (2011-04-28 20:23:47 UTC) #4
Diego Novillo
On Thu, Apr 28, 2011 at 15:57, Paolo Carlini <pcarlini@gmail.com> wrote: > ... are the ...
13 years ago (2011-04-28 20:24:18 UTC) #5
richard.guenther_gmail.com
On Thu, Apr 28, 2011 at 9:50 PM, Diego Novillo <dnovillo@google.com> wrote: > > This ...
13 years ago (2011-04-28 23:25:41 UTC) #6
jason_redhat.com
On 04/28/2011 03:50 PM, Diego Novillo wrote: > This patch from Silvius Rus adds a ...
13 years ago (2011-05-03 18:34:57 UTC) #7
richard.guenther_gmail.com
13 years ago (2011-05-04 09:02:01 UTC) #8
On Tue, May 3, 2011 at 8:34 PM, Jason Merrill <jason@redhat.com> wrote:
> On 04/28/2011 03:50 PM, Diego Novillo wrote:
>>
>> This patch from Silvius Rus adds a new flag (-fstrict-enum-precision).
>> While porting the patch to 4.6, I noticed that the C++ FE now has a
>> similar flag that seems to have similar semantics (-fstrict-enums).
>>
>> Silvius's patch is used to disable some switch() optimizations that
>> assume enum types can *only* take values within that enum (Silvius,
>> please correct me if I got this wrong).
>>
>> Jason, your -fstrict-enums only applies to the C++ front end.
>> Silvius's variant affects VRP and gimplification of switches.  Would
>> it be better if we simply moved -fstrict-enums to common options and
>> used that to decide whether to optimize switches in VRP and the
>> gimplifier?
>>
>> We use it internally to disable this optimization for code that
>> generates values outside of enum ranges.
>
> It seems that to me that this patch changes optimizations to not believe the
> lies of the C++ front end, whereas my patch changes the front end to not lie
> in the first place, making this patch unnecessary.

Correct.

Richard.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b