Today I noticed that the source code file in the project compiled, although it had trash at the top. It became interesting to me that everything goes without errors through the compiler. Here is an example of code that will not generate any error messages:
what kind of weird behaviour is this???
#include "stdafx.h"
int foo(int bar)
{
bla bla bla?????
return bar;
}
and more junk???
What does the compiler do in the world so that this code can compile without any error messages? I am using Visual Studio 2008 and this is unmanaged C ++ code. The foo function is not actually generated in the object file, so it cannot be used, but why there are no errors.
source
share