Date: Sun, 28 Dec 1997 11:45:08 +0200 (IST) From: Eli Zaretskii To: Nate Eldredge cc: Noam Rotem , djgpp AT delorie DOT com Subject: Re: Filtering warnings In-Reply-To: <199712261952.LAA12174@adit.ap.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Fri, 26 Dec 1997, Nate Eldredge wrote: > At 01:31 12/26/1997 PST, Noam Rotem wrote: > > >When I'm using the -Wall switch, I get also the warning about > >main, defaulting to 'int'... > > Strangely, I can't get the warnings myself. Compiling this program: > > #include > void main(void) { printf("Hello, world"); } > > yields no warnings, even with `-Wall' and/or `-W'. The warning is issued when you say "main(void)", not "void main(void)". The latter is perfectly legal, even though it's looking for trouble and against ANSI C rules.