Bugzilla

Zack Weinberg zack@codesourcery.com
Tue Feb 25 18:30:00 GMT 2003


dewar@gnat.com (Robert Dewar) writes:

>> Note that main compilers use "valid/invalid" in their diagnostics.
>> The suggestions thus mirrors practice.
>
> These terms are always tricky. In Ada legal/illegal are technical
> terms which mean precisely that syntactic and static semantic rules
> are/are not followed.  Valid (at least for programs) is not a
> techical term, and presumably would be interpreted to include the
> rejection of erroneous programs (undefined behavior in C) or
> programs with bounded errors (no analog in C).
>
> I am not objecting to the terms, just suggesting that somewhere they
> be precisely defined, and there may be language by language
> variations.

The historical use of "(il)legal code" in the BTS has been "the
compiler should (not) produce an object file from this input."
"(In)valid" has been taken as synonymous but politically preferred,
since no *law* is violated by buggy source code.  I think this
encompasses both Ada's "illegal" and "erroneous", although I'm not
sure whether all categories of "erroneous" Ada programs require
compile-time errors.

I think it would be useful to make fine distinctions in the BTS, but
in a language-neutral way -- avoiding terms of art for specific
languages and being verbose if necessary to avoid confusion.

zw



More information about the Gcc mailing list