| Summary: | valgrind-3.26.0 tests fail to build on upcomig gcc-16: unrecognized command-line option '-Wno-alloc-size-larger-than=18446744073709551615' | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | Sergei Trofimovich <slyich> |
| Component: | general | Assignee: | Paul Floyd <pjfloyd> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | mark, pjfloyd, sam, slyich |
| Priority: | NOR | ||
| Version First Reported In: | 3.26 GIT | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | 0001-bug-511972-check-for-both-W-and-Wno-warning-forms-gc.patch | ||
|
Description
Sergei Trofimovich
2025-11-11 22:04:50 UTC
Created attachment 186714 [details]
0001-bug-511972-check-for-both-W-and-Wno-warning-forms-gc.patch
0001-bug-511972-check-for-both-W-and-Wno-warning-forms-gc.patch implements `-W` / `-Wno-` option probing.
*** Bug 511974 has been marked as a duplicate of this bug. *** Does that now mean that GCC generates "alloc size larger than" warnings because it no longer supports '-Wno-alloc-size-larger-than=18446744073709551615 ? This feels like a regression in GCC. Why wouldn't it accept the -Wno variant that is accepted pre-gcc-16? Might it just get fixed in GCC 16 (which is still a couple of months away) if we just report it against GCC? I've changed the -Wno-alloc-size-larger-than=18446744073709551615 options to -Walloc-size-larger-than=18446744073709551616, which is more than the value that we are using (usually -1 converted to size_t). Seems to work with clang 19 and gcc 14. commit 51c5973d9d1f096b9472df75638f2a53324fafed (HEAD -> master, origin/master, origin/HEAD) Author: Paul Floyd <pjfloyd@wanadoo.fr> Date: Wed Nov 12 21:46:23 2025 +0100 Bug 511972 - valgrind-3.26.0 tests fail to build on upcomig gcc-16: unrecognized command-line option '-Wno-alloc-size-larger-than=18446744073709551615' Initial patch from Sergei Trofimovich, thanks. (In reply to Mark Wielaard from comment #4) > This feels like a regression in GCC. Why wouldn't it accept the -Wno variant > that is accepted pre-gcc-16? > Might it just get fixed in GCC 16 (which is still a couple of months away) > if we just report it against GCC? I think the change is intentional, but not sure. Added a comment to https://gcc.gnu.org/PR122243#c16. (In reply to Paul Floyd from comment #3) > Does that now mean that GCC generates "alloc size larger than" warnings > because it no longer supports > '-Wno-alloc-size-larger-than=18446744073709551615 ? Yeah, the original change resurfaced the warnings again. Your change still keeps it suppressed \o/ (In reply to Paul Floyd from comment #5) > I've changed the -Wno-alloc-size-larger-than=18446744073709551615 options to > -Walloc-size-larger-than=18446744073709551616, which is more than the value > that we are using (usually -1 converted to size_t). Seems to work with clang > 19 and gcc 14. > > commit 51c5973d9d1f096b9472df75638f2a53324fafed (HEAD -> master, > origin/master, origin/HEAD) Works for `gcc-16` as well. No alloc-size related warnings. Thank you! The only new warning in `gcc-16` (unrelated to `-Wno-`) is: new_override.cpp:21:16: warning: variable 'j' set but not used [-Wunused-but-set-variable=] 21 | volatile int j = 0; | ^ An effect of https://gcc.gnu.org/PR44677 ( https://gcc.gnu.org/r16-2258-g0eac9cfee8cb0b21d ). |