------- Comment #5 from redi at gcc dot gnu dot org 2010-04-30 11:26 ------- The point being that it's undefined behaviour to /return/ from such a function, not to /write/ such a function.
If the programmer guarantees the "missing return" will never happen then there's no error. I was wrong to say it's OK as long as the caller doesn't use the return value - but it is OK as long as control never reaches the "missing return" -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43943