On Mon, Oct 6, 2025 at 7:21 PM Sam James <[email protected]> wrote: > > Sandra Loosemore <[email protected]> writes: > > > On 10/6/25 19:03, Andrew Pinski wrote: > >> On Mon, Oct 6, 2025 at 5:58 PM Sam James <[email protected]> wrote: > >>> > >>> CCP interacts poorly with -Wuninitialized in some cases by assuming a > >>> value > >>> which stops us warning about it (false negatives). Inform users about this > >>> infamous interaction. > >>> > >>> gcc/ChangeLog: > >>> PR tree-optimization/18501 > >>> > >>> * doc/invoke.texi (-Wuninitialized): Mention interaction with > >>> CCP. > >>> --- > >>> We give some 'more effective' notes like this for -ftree-vrp. What do you > >>> think? > >> Not a fan at all of the "more effective" here. Since unlike the other > >> effective notes which are about turning on optimizations, this is > >> about turning them off. > >> Maybe the following is better: > >> ``` > >> -Wmaybe-uninitialized is known not to warn in many situations (false > >> negatives) due to some optimizations (like cpp, -ftree-ccp). > >> ``` > > > > Yeah, my initial reaction was that "more effective" didn't really > > explain what the problem was. I think it would be better to phrase > > this more directly in the active voice, something like > > I admit I chose somewhat "stub phrasing" because I wanted to see if > people were OK with the idea of "docs accommodating known, long-term > bugs" ;) > > > > > Some optimizations interfere with @option{-Wmaybe-uninitialized} and > > may cause false negatives. In particular, disabling the conditional > > constant propagation pass with @option{-fno-tree-ccp} gives more > > accurate diagnostics. > > I like that.
Yes, that is much better phrasing than I did. Thanks, Andrew > > > > > ?? > > > > -Sandra
