I've started to look at what it is required to convert the testsuite to C99 (without implicit ints, without implicit function declarations, and a few other legacy language features).
I plan to bundle a bunch of fixes together and submit patches incrementally. So far, I have identified the following change categories: * C89 test cases that appear to make explicit use of C89-only features. I plan to add /* { dg-additional-options "-std=gnu89" } */ to those (or add -std=gnu89 to an existing dg-options line). These fixes can be submitted early. * Overly reduced test cases where I can verify that the less-reduced test case still reproduces the bug. Can be submitted early. * Similar test cases where I cannot verify that the test case is still reproducing the bug, but where I assume that the unreduction is harmless as far as the test objective is concerned. Can be submitted early (but should be in a separate patch from the previous one). * Test cases which have to build with -fpermissive. These include expected-warnings tests, and over-reduced test cases where unreducing might conceivably interfere with the test objective. These fixes have to wait until -fpermissive for C lands (or they could wait until the first relevant use of permerror). * Test cases which check (for example) error locations from diagnostics that used be warnings, but that are now errors, and other test cases where it seems to make sense to test for errors now. Here I plan to change dg-warning into dg-error as appropriate. These changes would be submitted along the patch that introduces the relevant permerror calls. In some cases, I plan to duplicate tests into warning variants (now with -fpermissive) and error variants (with dg-warning changed to dg-error). * There's the matter of target-specific tests that I don't know how to cover. I can probably run the testsuite on x86-64, POWER9 and AArch64, but beyond that, I'm pretty much out of options. I will have to rely on help from the community, and perhaps target maintainers adjusting their tests after the permerror changes according to the principles above. Overall, I'm quite happy with the -fpermissive and permerror behavior I see with Jason's patch so far. As far as I can tell, permerrors are flagged in system headers, which is what we want from a distribution perspective at least. I could get -std=gnu89 -pedantic-errors to work (it should still flag these things as errors, as before), and -std=gnu89 -fno-permissive works out of the box, too. (Beyond the testsuite, we will need some libgcc fixes. I've started to submit patches for that, but they have been bogged down in discussions how to best fix the broken code unfortunately.) Thanks, Florian