Date: Sun, 28 Dec 97 21:34:51 PST From: Noam Rotem Subject: Re: Filtering warnings To: Nate Eldredge Cc: djgpp AT delorie DOT com Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=us-ascii Precedence: bulk >>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 >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