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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-09-17
             Status|UNCONFIRMED                 |NEW

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Aldy Hernandez from comment #7)
> Silly question, why can't you expand the [[assume]] construct into:
> 
> if (x > 5)
>   __builtin_unreachable ();
> 
> ...like we always have.  Then no changes are needed to ranger :).  Or does
> this have to do with the whole side-effect thing?

Exactly.  For expressions with no side-effects, we can do that.  For, say, a
call to a non-const function, we need to avoid actually emitting the call.

Reply via email to