[Bug testsuite/53028] add dg-pedantic

mikestump at comcast dot net gcc-bugzilla@gcc.gnu.org
Tue Apr 24 00:31:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53028

--- Comment #9 from Mike Stump <mikestump at comcast dot net> 2012-04-24 00:31:35 UTC ---
Since little proof was added to support the assertion that the additional
testing is useful, I can remain skeptical about it, though, the CFE people
certainly are free to require it, what they say goes.  I like the idea of
testing new code, just I think it could be over done.

I'll give you an example, I think we all can agree on.

Let's say we add a warning.  The code goes in, and a single testcase:

main() {
    i = code to produce warning;  // warning
}

but, we don't also test:

-pedantic-errors

main() {
    i = code to produce warning; // warning
}

even though, it is reasonable.  We could, but don't.  Why don't we, because it
isn't worth the testing time and the maintenance time.  Testing it once, and
assuming that no one will accidentally change the warning is reasonable.  We
also don't test that the warning goes away with -w.  We don't test the warning
turns into an error with -Werror.

How many times has one of these tests caught someone modifying a pedantic into
a warning?  How many times has one of these tests caught someone modifying a
pedantic into an error?  How many times did someone modify a pedantic in one of
the two ways because a testcase wasn't present?

Feel free to use your best recollection for the above answers.  I can't help
but think the numbers are so low, as to not be worth the cost of the additional
testcases.



More information about the Gcc-bugs mailing list