https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106654
Pilar Latiesa <pilarlatiesa at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pilarlatiesa at gmail dot com --- Comment #5 from Pilar Latiesa <pilarlatiesa at gmail dot com> --- (In reply to Jakub Jelinek from comment #4) > Note, I think for [[assume(i == j)]]; we can just emit if (i == j) ; else > __builtin_unreachable (); It would be great if the attribute were somewhat cleverer than that. For example: double my_sqrt(double const d) { [[assume(d >= 0.0)]]; return std::sqrt(d); } or even: double my_sqrt(double const d) { [[assume(std::isfinite(std::sqrt(d)))]] return std::sqrt(d); }