Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!ssc-vax!dmg From: dmg@ssc-vax.UUCP (David Geary) Newsgroups: comp.lang.c Subject: Re: declaring variable Message-ID: <2585@ssc-vax.UUCP> Date: 7 Apr 89 17:21:51 GMT Organization: Boeing Aerospace Corp., Seattle WA Lines: 35 In article <26707@tiger.oxy.edu>, Michael Hunter writes: || A friend of mind had a program that wasn't working properly. (what a nice start) || Within this program was a declaration that was similar to: || double A, || B, || fooY, || fooX, || whelp; /* <--- note this */ || WhatAmI, || AndMoreVariables; || || He was compiling his program under TurboC 2.0. The compiler with all warning || turned on was not saying anything about the semi after whelp. But It did || not appear to be allocating space for the variable....at least in the debugger || if there was a line of the form whelp=constant, whelp did not change || value. || Two questions: || 1) Why isn't WhatAmI, AndMoreVariables; a syntax error? How does the || grammar produce this? || 2) What happens on other machines....do most compilers say something || and does lint howl? One answer: TurboC2.0 is broken in this regard. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ David Geary, Boeing Aerospace, Seattle ~ ~ "I wish I lived where it *only* rains 364 days a year" ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~