Entry as a reserved word
Chris Calabrese[mav]
cjc at ulysses.att.com
Sat Jun 9 00:17:07 AEST 1990
In article <4542 at castle.ed.ac.uk>, mfg at castle.ed.ac.uk (M Gordon) writes:
> Most compilers I have used have entry as a reserved word but I've never been
> able to find anywhere that tells me what it's for. My guess would be it was
> supposed to be used to mark a function as the entry point for the program
> [...]
That's funny, the test program I tried to catch this with had no
problems at all under:
gcc on a sun 3 with SunOS 4.0.3
cc on the same as above
cc on a vax 8650 with BSD 4.3
cc on 3b2/600 running sVr3.2.2
Here's the test program:
main() { int entry; }
Here's what lint had to say about it (lint -p on sV is _very_ picky):
lint -p foo.c
foo.c
==============
(1) warning: entry unused in function main
(1) warning: main() returns random value to invocation environment
Here's what gcc -Wall (als picky) had to say:
/tmp/foo.c: In function main:
/tmp/foo.c:1: warning: return-type defaults to `int'
/tmp/foo.c:1: warning: unused variable `entry'
/tmp/foo.c:1: warning: control reaches end of non-void function
Name: Christopher J. Calabrese
Brain loaned to: AT&T Bell Laboratories, Murray Hill, NJ
att!ulysses!cjc cjc at ulysses.att.com
Obligatory Quote: ``Anyone who would tell you that would also try and sell you the Brooklyn Bridge.''
More information about the Comp.lang.c
mailing list