Mail Archives: djgpp/1997/12/28/14:44:13
>>When I'm using the -Wall switch, I get also the warning about
>>main, defaulting to 'int'...
> IMHO, people who use `void main' deserve the
>warnings. Either don't do that, or ignore them.
>Strangely, I can't get the warnings myself. Compiling this program:
>#include <stdio.h>
>void main(void) { printf("Hello, world"); }
>yields no warnings, even with `-Wall' and/or `-W'.
My declaration was: *main()* not *void main()*.
main() indeed defaults to int main(), but the question was how to use the
shortcut without being warned.
---------------------------------------------
Noam Rotem
John Bryce Training Centre
Tel Aviv, Israel.
03-7535803
=============================================
1. Take upon yourself an impossible mission.
2. Accomplish the mission.
3. Go back to step 1.
It's the only sane answer to modern life.
---
28/12/97
21:34:51
- Raw text -