This is the mail archive of the
mailing list for the GCC project.
RE: Warnings about rcs_id strings: let's settle this
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Kean Johnston <jkj at sco dot com>
- Cc: 'Mark Mitchell' <mark at codesourcery dot com>, 'Zack Weinberg' <zack at codesourcery dot com>, 'Joe Buck' <jbuck at synopsys dot com>, gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 3 May 2003 20:22:30 +0100 (BST)
- Subject: RE: Warnings about rcs_id strings: let's settle this
- References: <00c301c311a3$17b95830$03419384@shrike>
On Sat, 3 May 2003, Kean Johnston wrote:
> > changes regarding inline functions and declarations in system headers,
> That is what was in the 3.2 code, I was just restoring it. I am not
> introducing new behaviour, so no new test is needed. I was, on request,
> restoring the old behaviour.
The patch changes the observable behaviour of the compiler, so requires a
testcase that the observable behaviour is changed as intended and the code
does what is intended. *All* patches making an observable change to the
compiler need a test that they work or a proper justification of
untestability (or of no need for a test, e.g. typo fixes in diagnostics).
If someone in future decides to remove any one of the lines of code you
added, there should be a testcase failure drawing their attention to the
fact that -Wall is deliberately that way and they need to consider whether
their behaviour change is desired (necessitating a testcase change in that
case). While whoever changed the behaviour between 3.2 and 3.3 should
have added a testcase which your patch makes fail, that they did not do so
doesn't mean you don't need to add one when changing the behaviour back.
(Or if they did add a testcase and running the testsuite with your patch
shows a new failure, that testcase needs updating.)
That you are restoring the 3.2 behaviour just means that there need not be
documentation changes, since the documentation still describes the old
behaviour: it does not mean a testcase is not needed.
<http://gcc.gnu.org/contribute.html> is quite clear:
You will of course have tested that your change does what you expected
it to do: fix a bug, improve an optimization, add a new feature. If
the test framework permits, you should automate these tests and add
them to GCC's test suite. You must also perform regression tests to
ensure that your patch does not break anything else.
If you cannot follow the recommendations of the GCC coding
conventions about testcases, you should include a justification
for why adequate testcases cannot be added.
Joseph S. Myers