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: Warnings about rcs_id strings: let's settle this

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.  
<> 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

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