On Sat, 2024-07-20 at 07:16 +0100, Sam James wrote: > Xi Ruoyao <xry...@xry111.site> writes: > > > On Sat, 2024-07-20 at 06:52 +0100, Sam James wrote: > > > Some distributions like Gentoo make -Wformat and -Wformat-security > > > enabled by default. Pass -Wno-format to the test to avoid a spurious > > > fail in such environments. > > > > > > gcc/testsuite/ > > > PR rtl-optimization/115929 > > > * gcc.dg/torture/pr115929-1.c: Pass -Wno-format. > > > --- > > > > IMO if you are patching GCC downstream to enable some options, you can > > patch the test case in the same .patch file anyway instead of pushing it > > upstream. > > It's a fair argument. > > That said, you did say the same thing reflexively about -fhardened, even > if this is a different situation ;) > > One might argue that especially for torture/, supporting "not > unreasonable" random flags is not a bad thing. > > > > > If we take the responsibility to make the test suite anticipate random > > downstream changes, the test suite will ended up filled with different > > workarounds for 42 distros. > > > > My counterpoint would be that there are certain warnings we know various > distros enable by default, and various warnings where it's not > inconceivable we might do them upstream at some point.
Then I'll prefer the change log not to say "Gentoo makes GCC enable - Wformat by default", but something like "-Wformat is a commonly used flag and people may run test suite with it enabled" and maybe also "we may turn it on by default in the future." I.e. not to mention a specific distro (so distro maintainers cannot use the changelog as a reason to push random messes), but consider the situation someone running the test suite with some not so strange CFLAGS. Just my 2 cents. I'm just a "write after approval" guy anyway and I've no permission to Ack or Nack a patch. And I'm somewhat frustrated after my test suite fixes for default PIE (well we have --enable-default-pie and AFAIK every distro is using it, so IMO it should have a higher priority than -Wformat) gets no response after Ping^5. -- Xi Ruoyao <xry...@xry111.site> School of Aerospace Science and Technology, Xidian University