On Fri, 27 Aug 2010 08:10:49 -0700, Mark Roden <mmro...@gmail.com> wrote: > And it turns out that it is valid C++ to have > void main() > > because it's valid C. > > Source: > http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/legality-of-void-main.html
You seem to have misread the link (which appears to falsely assert that "otherwise its type is implementation-defined" is functionally different from "some other implementation-defined manner"). The validity is implementation-defined, it is not standard C or C++. And C++ is not a superset of C (far from it), so even if the C standard did guaratee that returning void was supported (it doesn't), it would not imply that C++ supports it. If you want portable code, main must return int. Jed _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake