>> So it would be great if there were a single gcc warning flag to enable >> this particular warning, rather than the heavy handed --pedantic. > > -Wreturn-type might be the one. It specifically doesn't warn when you return a void expression in a void context, currently only --pedantic does that afaik.