How to turn on gcc warnings for a forgotten return statement?

How do I turn on gcc warnings for a forgotten return statement?

It is supposed to warn me in cases like the following:

int foo() {
  std::cout << "haha";
}

I know -Wall turns that warning on, but it enables too many other warnings.

6
задан Frank 13 April 2011 в 20:26
поделиться