Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!hubcap!ncrcae!ncr-sd!hp-sdd!hplabs!hpda!hpcuhb!hpcllla!hpclisp!hpclwjm!walter From: walter@hpclwjm.HP.COM (Walter Murray) Newsgroups: comp.lang.c Subject: Re: Re: ANSI Validation (And Validation in general). Message-ID: <660057@hpclwjm.HP.COM> Date: 25 Aug 89 19:05:05 GMT References: <20500@sequent.UUCP> Organization: Hewlett-Packard Calif. Language Lab Lines: 32 Paul Reger writes: > I was wondering what experiences anyone has had with test suites for > C. To date we are using a commercial suite for C but we are finding > the coverage of it lacks in many areas particulary when it comes to > 'oddball' expressions found often in kernel code. For example the > following code construction: > if ((struct xyz *) 0x2000 ->element == 29) > Is not in the test suite, neither is: > int > func(i) > register int i; > { > ... > if (((short) i = f(45)) < 0) > /* the line containing the problem... */ It's not clear what you are asking for. Neither of these constructs is legal, either by K&R or ANSI C, though I have no doubt there are some compilers which accept them. An ANSI-conforming compiler will be required to produce a diagnostic on a program that contains either of these examples. Are you asking for a validation suite that guarantees that a compiler will produce the required diagnostic, or do you want it to ensure that a compiler will actually accept such bogus constructs? Walter Murray --