[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GCC



Werner Mahr <werner@vollstreckernet.de> writes:

> Am Dienstag, 17. Februar 2004 06:27 schrieb Mike M:
>
>> main()
>> test.cpp:4: warning: ISO C++ forbids declaration of `main' with no type
>
> void main(void) and you have a type.

You'd also have undefined behavior then. The main function *must* return
int, see section 3.6.1p2 of ISO/IEC 14882:1998 (the C++ standard).

Martin



Reply to: