https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86284
--- Comment #5 from Andrew Pinski ---
-fsanitize=unreachable will find the C++ cases right now.
For C, it is a little harder because it is only undefined if the value is used.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86284
--- Comment #4 from Andrew Pinski ---
(In reply to Andrew Pinski from comment #3)
> I thought it was defined unless the return value is actually used.
To answer my own question:
For C it is. For C++ it is not; it is undefined if there is no ret
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86284
--- Comment #3 from Andrew Pinski ---
I thought it was defined unless the return value is actually used.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86284
Richard Biener changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86284
--- Comment #1 from Marc Glisse ---
-fsanitize=return ?