www.digitalmars.com         C & C++   DMDScript  

c++ - No warning for missing return value

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