https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48580
--- Comment #21 from Martin von Gagern <Martin.vGagern at gmx dot net> --- (In reply to myself from comment #15) > (In reply to comment #7) > > […] built-in operations where you can just say "multiply two > > (signed) values, check whether the result fits in 31-bit unsigned and set > > an overflow flag accordingly". > > Would be easier to read, easier to maintain, and less difficult to detect. > Sounds like an overall win. I'm very much in favor of builtins like these. > > I'd rather make the overflow indicator the return value, and transfer the > result to a location indicated via a pointer. Cross reference: bug #59708 is going in this direction, motivated by a precedence set by clang. (In reply to Zack Weinberg from comment #18) > I just want the code in the original bug report to be optimized. I suggested duping bug #49467 there instead, in which case this issue here could return to the originally requested goal of detecting idioms without relying on builtins.