ubsan: -Wreturn-type and ubsan trap-on-error
[official-gcc.git] / gcc / testsuite / g++.dg / ubsan / return-8.C
blob354c96098d282f9e7e366ba5cd8fb8c1f11ad8df
1 // { dg-additional-options "-fsanitize=undefined -fsanitize-undefined-trap-on-error" }
3 bool b;
5 int f() {
6   if (b) return 42;
7 }                       // { dg-warning "-Wreturn-type" }
9 int main() { f(); }