| www.delorie.com/archives/browse.cgi | search |
| From: | Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com> |
| Message-Id: | <199705132323.AA168155813@typhoon.rose.hp.com> |
| Subject: | void main |
| To: | djgpp AT delorie DOT com |
| Date: | Tue, 13 May 1997 16:23:32 PDT |
Not that quoting from the standard shouldn't be enough to convince
people that "void main ..." in non-ansi compliant, here is the output
from a recent gcc snapshot
ptest.c has
void main(){}
compiled with gcc -pedantic
ptest.c: In function `main':
ptest.c:1: warning: return type of `main' is not `int'
It does still allow you to just type "main" and have it default to int
without issuing a warning if only -pedantic is specified.
Andrew
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |