Sunday, 25 August 2013

No warnings for that function int f() doesn't return any value?

No warnings for that function int f() doesn't return any value?

struct A
{
int f()
{} // Notice here!
};
int main()
{
A a;
a = a;
}
My compiler is the latest VC++ compiler (Visual Studio 2013 Preview)
The function A::f doesn't return any value; but no compiler warnings or
errors! Why?

No comments:

Post a Comment