This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR19100: truthvalue_conversion vs. TREE_OVERFLOW (take3)

On Mon, 3 Jan 2005, Joseph S. Myers wrote:
> I don't think there's presently adequate testsuite coverage for the
> diagnostics for overflow in implicit constant conversions.  (There isn't
> *any* coverage for the diagnostics for overflow in arithmetic, but I think
> properly testing that the diagnostics for implicit conversions don't
> change or only change to fix bugs would suffice for this patch.)

Whilst it its true that the testsuite coverage appears lacking, the use
of -Werror during GCC bootstrap was unable to uncover a significant
number of corner cases that increased my confidence in the final version
of this patch.

For example, tree-cfg.c's find_case_label_for_value contains the
equivalent of

	size_t low = -1;

which immediately tests that we don't warn for overflowing assignment
of unsigned size_t.  It transpires that this function doesn't actually
need to store negative values in unsigned types, and I have a follow-up
patch to address that, but it does demonstrate that gcc's testing does
catch still catch things that appear to be holes in our testsuite [which
are probably best left to conformance tests, such as Plum-Hall].

I'm not sure whether to interpret your response as implicit approval,
as all of the current tests in the testsuite continue to pass, or as
a request to improve testsuite coverage of C and C++'s diagnostics.
PR19100 is a wrong-code bug after all.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]