ANSI Validation (And Validation in general).
Walter Murray
walter at hpclwjm.HP.COM
Sat Aug 26 05:05:05 AEST 1989
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
--
More information about the Comp.lang.c
mailing list