Gabriel Dos Reis - Re: Patch: New implementation of -Wstrict-aliasing (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: Gabriel Dos Reis
- To: Silvius Rus
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 01 Feb 2007 05:01:00 -0600
- Subject: Re: Patch: New implementation of -Wstrict-aliasing
- References: 200701200222.l0K2MIvn031819@localhost.localdomain 45B2C523.6010808@google.com 878xfx2jv3.fsf@soliton.cs.tamu.edu 45BFC76B.6060504@google.com 87wt331z3m.fsf@soliton.cs.tamu.edu 45C1117A.1020807@google.com
Silvius Rus rus@google.com writes:
[...]
| > My general thinking was that, the compile-time consumed by warning | > about non-conforming aliasing will increase with the level. So, for | > example level=1 will be quick but not very precise, and level=4 might | > be slow but more accurate. Just like with optimization levels. | > What motivates your choice in the other direction? | > | I made this choice for consistency with the existent | -Wstrict-aliasing. In the previous implementation, level 2 was | usually less accurate than level 1, in the sense that it produces more | false positives. However, I agree that ordering them by increasing | accuracy (and effort) makes good sense by analogy to optimization | levels. I have no problem reversing the proposed order, as long as | the most accurate one is the default. Let me know if you are OK with | this revised order: | level 1: least precise due to many false positives | level 2: more precise, still some false positives | level 3 (default): most precise, very few false positives and few | false negatives | level 4: improvement to level 3, but cannot be default because it | breaks bootstrap | Also, ordering them by increasing complexity allows us to add future | detection methods as higher level numbers. I can see in the future a | more precise implementation based on virtual SSA rather than points-to | information.
Hi Silvius,
I much like this scheme where higher levels give more accurate diagnostic, and still level room for improvement did we need to add more levels (I hope that need would not be frequent, still).
Do you have some data about the relative cost (in terms of compiler-time) of level 2 vs level 3? This is for decidiing which should be the default.
Many thanks for doing this.
-- Gaby
- Follow-Ups:
- Re: Patch: New implementation of -Wstrict-aliasing
* From: Silvius Rus
- Re: Patch: New implementation of -Wstrict-aliasing
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |