This is the mail archive of the gcc-patches@gcc.gnu.org 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 RFA: C++ frontend warning: comparing function pointer to NULL


On 07/01/07, Joseph S. Myers <joseph@codesourcery.com> wrote:
On Sun, 7 Jan 2007, Manuel Lopez-Ibanez wrote:

> Also, perhaps we could consider this something to take into account
> before sending patches that add new testcases. Most of the time, a
> simple grep on the option name or a representative part of the
> expected output will bring up similar (and thus redundant) testcases.
> Maybe this could be commented somewhere...

It's generally a mistake to consider testcases redundant unless actually
identical.  While two testcases may appear to test the same thing with the
current implementation while the compiler is working correctly, a
reimplementation of a feature or diagnostic could cause them to take
different code paths, and a regression could break one similar case but
not the other.

Of course, being strict, unless the two testcase files are byte-wise identical, anything may happen. But I guess that there may be some practical assumptions about the equivalence of testcases that allows to avoid testing every possible variation of any random testcase.

For example, I would consider that it is generally safe to assume from
a practical point of view that if two testcases vary only in
whitespace, then they may be considered equivalent. I would go a bit
further and consider that if two testcases vary only on the names of
identifiers, then they may be considered equivalent. I guess we could
find more practical assumptions.

Of course, equivalence should be decided for each testcase. What I
wished to say is that it should be taken into account. Or perhaps not,
if we don't care about the testsuite size, regression testing time and
testcases getting silently obsolete. It was more a subtle question
that a firm proposal.

Here is another question, if I find a testcase in g++.old-deja that is
relevant for a patch that I am going to submit, would it be
appropriate to move it to g++.dg/X and give it an apter name?

For example, if I am preparing testcases such Wsuperwarning-1.C,
Wsuperwarning-2.C and I find that g++.old-deja/g++.mike/warn19.C is
relevant for -Wsuperwarning, should I do "mv
g++.old-deja/g++.mike/warn19.C g++.dg/warn/Wsuperwarning-3.C ?

Cheers,

Manuel.


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