https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118308
--- Comment #3 from Raffaello Bertini ---
ok thanks for the reply. btw it is enough to enable the warnigs.
```
bool f()
{
printf("f");
}
int main(int argc, char* argv[])
{
if (f())
printf("y");
else
printf("n");
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118308
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118308
--- Comment #1 from Andrew Pinski ---
It is only undefined behavior if you use the value from a function which has a
return type but does not return a value.
The example you have in comment #0 is 100% well defined C code.
Note C++ is different