barmar@think.COM (Barry Margolin) (12/17/88)
In article <5202@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: >Perhaps a solution would be for somebody to come up with a C compiler >validation suite, and also a trade-marked term such as "__VALIDC__". Unfortunately, a validation suite would have a hard time failing an implementation that has extensions that define new reserved words. It would only fail if it happened to use one of the new reserved words as an ordinary identifier. You can try to catch some of the more common extensions by trying to use "near", "far", and "asm" as identifiers, but how are you going to guess that my implementation reserves the word "frobnicate"? Similarly, suppose an implementation defines a new operator, using a syntax that is undefined by the standard (e.g. the much-discussed "^^" short-circuit XOR :-). How would a validation suit discover this invalidity? The latter case isn't as much of a problem as the former, because it only causes non-conforming programs to work. Defining new reserved words in the user namespace can cause strictly-conforming programs to fail. Barry Margolin Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar