Article View: comp.std.c
Article #4261Re: Comma operator in constant expression
From: Jens M Andreasen
Date: Fri, 20 Oct 1995 21:56
Date: Fri, 20 Oct 1995 21:56
38 lines
2183 bytes
2183 bytes
On 20 Oct 1995, Christopher R. Volpe wrote: > >A constant is permitted, right? > > Yep. Too bad we don't have one. My point is that we do not have anything but alfabetsoup before evaluation. You are expecting a compiler to know the meaningfulness of random characters without letting it actually read it ? Then by what method shall we find the hidden comma expression (Or any other doubtful expression, including the works of Shakespeare)? Intuitively, but in no way proven, this would involve parsing of a yet unknown nature. Or to put it another way: At what time of compile are we going to tell the user that his code is way off? 1) When we know what it means. 2) Before we know what it means. This Is important since the expression we are discussing changes drastically after evaluation. You found the comma, and you realized that it did not belong there. This is fantastic (no sarkasm here, I do believe life is beutiful) but I can't see any way of formalising this general ability into a machine method. And the point here is that we are not only discussing a single special case, but also trying to cope with empty statements in general. If this means that the wordings must be slightly changed to fit reality then please go ahead, but as I see it, it is matter of *when* the standard is to be consulted rather than how, where all we seems to agree upon is that at least it should be after opening the file. // Jens M Andreasen (representing noone but ... you guessed it)
Technical Details
Message-ID:
<Pine.ULT.3.91.951020212504.26923A-100000@mars.dsv.su.se>Path:
arc1-ca.pugleaf.net!mars.dsv.su.se!jens-andReferences:
<45uevf$d99@news0.rain.rg.net> <Pine.ULT.3.91.951017124752.2343A-100000@mars.dsv.su.se> <464s1t$lb4@usenet.pa.dec.com> <Pine.ULT.3.91.951019204530.7241B-100000@mars.dsv.su.se> <4685n3$l8k@rdsunx.crd.ge.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!mars.dsv.su.se!jens-and From: Jens M Andreasen <jens-and@dsv.su.se> Newsgroups: comp.std.c Subject: Re: Comma operator in constant expression Date: Fri, 20 Oct 1995 22:56:05 +0100 Message-ID: <Pine.ULT.3.91.951020212504.26923A-100000@mars.dsv.su.se> References: <45uevf$d99@news0.rain.rg.net> <Pine.ULT.3.91.951017124752.2343A-100000@mars.dsv.su.se> <464s1t$lb4@usenet.pa.dec.com> <Pine.ULT.3.91.951019204530.7241B-100000@mars.dsv.su.se> <4685n3$l8k@rdsunx.crd.ge.com> NNTP-Posting-Host: mars.dsv.su.se Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <4685n3$l8k@rdsunx.crd.ge.com>