Path: utzoo!attcan!uunet!cs.utexas.edu!usc!ucsd!ucbvax!ulysses!ulysses.att.com!cjc From: cjc@ulysses.att.com (Chris Calabrese[mav]) Newsgroups: comp.lang.c Subject: Re: Entry as a reserved word Summary: entry not reserved on any compilers around here Message-ID: <13083@ulysses.att.com> Date: 8 Jun 90 14:17:07 GMT References: <4542@castle.ed.ac.uk> Sender: netnews@ulysses.att.com Lines: 33 In article <4542@castle.ed.ac.uk>, mfg@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@ulysses.att.com Obligatory Quote: ``Anyone who would tell you that would also try and sell you the Brooklyn Bridge.''