Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sunybcs!boulder!hao!husc6!cca!mirror!datacube!ftw From: ftw@datacube.UUCP Newsgroups: comp.lang.c Subject: Re: reserved words or what? Message-ID: <102600021@datacube> Date: Mon, 16-Nov-87 10:16:00 EST Article-I.D.: datacube.102600021 Posted: Mon Nov 16 10:16:00 1987 Date-Received: Thu, 19-Nov-87 06:03:07 EST References: <3086@psuvax1.psu.edu> Lines: 34 Nf-ID: #R:psuvax1.psu.edu:-308600:datacube:102600021:000:961 Nf-From: datacube.UUCP!ftw Nov 16 10:16:00 1987 schwartz@gondor.psu.edu.UUCP writes: > given: > main() > { > int a,b,signed; > a = b = signed = 1; > } > is this legal? PCC on a vax running 4.3BSD and a Sun running SunOS 3.2 > doesn't complain. Neither does lint (at least on the sun), except to > report that a,b, and signed are set but not used. On the other hand > GCC doesn't want to see a variable named signed. Which compiler is > broken? > Disclaimer: I don't have a copy of the latest ANSI draft, or even an old > copy of K&R at hand. > -- Scott Schwartz schwartz@gondor.psu.edu According to dpANS, "signed" is a keyword, and therefore can't be used as a variable name. The answer to your question is that the Sun compiler is "broken". Farrell T. Woods Datacube Inc. Systems / Software Group 4 Dearborn Rd. Peabody, Ma 01960 VOICE: 617-535-6644; FAX: (617) 535-5643; TWX: (710) 347-0125 INTERNET: ftw@datacube.COM UUCP: {rutgers, ihnp4, mirror}!datacube!ftw