c++ - No warning for missing return value
- Thomas Hammig (12/12) Apr 29 2003 It seems that the 2 warnings
It seems that the 2 warnings - implied return at closing '}' does not return value - no return value for function 'identifier' are never generated even though all warnings are enabled For example: int add (int a, int b) { int res; if (a == 0) return; // no return value res = a + b; } // missing "return res" here Tested with compiler version 8.27 and 8.33
Apr 29 2003