https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101862

--- Comment #3 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
Thanks for your comments!


(In reply to Andrew Macleod from comment #1)
> I'm not sure exactly what you want to do.

Neither am I!  ;-) (Well, I do know "what", but not yet "how".)

> The EVRP pass recognizes [...]

> This seems to be too late to determine that a warning might be appropriate..
> and I'm not sure how you would figure that out from this IL.
> 
> We have to go way back before gimple before we see the conditional
> expression.

> The range machinery knows what you want to know, but IM not sure how you
> could use it. Its only available once we go into SSA.

Idea: preserve the original front end AST (or whatever is appropriate), for
"potential diagnostics" ("delayed diagnostics"?), and then (re-)evaluate once
we have VR information (and whatever else is necessary).


> we usually rejoice when we can fold asserts away :-)

A classic case of tuning for code generation vs. diagnostics.  ;-)

Reply via email to