Article View: comp.std.c
Article #4689Re: Double-character operators
From: Norman Diamond
Date: Tue, 23 Jan 1996 05:24
Date: Tue, 23 Jan 1996 05:24
32 lines
2368 bytes
2368 bytes
In article <4e17uk$g3@kocrsv08.delcoelect.com>, c2xrfs@eng.delcoelect.com (Richard F. Smiley) writes: >Specifically, should the three-character sequence "& =" be >treated as representing the two-character operator "&="? Assuming this is in the main C language (i.e. after preprocessing has been done, and not inside a string literal or anything), I think that any program containing the three-character sequence "& =" must have a syntax error. Every conforming implementation must issue a diagnostic. >However, a compiler I respect instead treats this as a legal fragment >involving the "&=" operator. Is that allowed? (The program fragment >was caused by a bad macro definition. If the compiler had complained, >we would have found the problem earlier.) In addition to issuing a diagnostic, the implementation is free to do whatever else it likes, such as pretending it was the two-character operator "&=". Furthermore, the diagnostic doesn't have to be accurate or meaningful. If the implementation issues any diagnostic at all, for example a warning about some other part of the program, or a warning saying that the implementation doesn't try very hard, then it meets the requirement. If the implementation issued no diagnostic at all about your program, and if you invoked the implementation according to the vendor's instructions for a conforming implementation, then I'd say you're entitled to a refund. In any case, you can consider not buying anything further from that vendor. The marketplace speaks louder than the standard, and on rare occasions quality speaks too. -- << If this were the company's opinion, I would not be allowed to post it. >> "I paid money for this car, I pay taxes for vehicle registration and a driver's license, so I can drive in any lane I want, and no innocent victim gets to call the cops just 'cause the lane's not goin' the same direction as me" - J Spammer
Technical Details
Message-ID:
<4e1rf2$tju@usenet.pa.dec.com>Path:
arc1-ca.pugleaf.net!tko.dec.com!diamondReferences:
<4e17uk$g3@kocrsv08.delcoelect.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!tko.dec.com!diamond From: diamond@tko.dec.com (Norman Diamond) Newsgroups: comp.std.c Subject: Re: Double-character operators Date: 23 Jan 1996 05:24:50 GMT Organization: Digital Equipment Corporation Japan , Tokyo Message-ID: <4e1rf2$tju@usenet.pa.dec.com> References: <4e17uk$g3@kocrsv08.delcoelect.com> Reply-To: diamond@jrdv04.enet.dec-j.co.jp (Norman Diamond) NNTP-Posting-Host: jit533.tko.dec.com