https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122243
Sergei Trofimovich <slyfox at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at gcc dot gnu.org,
| |slyfox at gcc dot gnu.org
--- Comment #16 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
(In reply to GCC Commits from comment #7)
> The master branch has been updated by Sandra Loosemore <[email protected]>:
>
> https://gcc.gnu.org/g:5b276d38c2fdd7df3d167755940da2038e049308
>
> commit r16-5128-g5b276d38c2fdd7df3d167755940da2038e049308
> Author: Sandra Loosemore <[email protected]>
> Date: Fri Oct 17 15:11:47 2025 +0000
>
> Add "RejectNegative" to some options where it doesn't make sense
> [PR122243]
>
> This patch adds the "RejectNegative" property to several options where
> it doesn't make sense. These are either options of the form
> "name=value" rather than an on/off switch, those that are already in a
> "no-" form, or options that form a mutually-exclusive set.
>
> Also, the fhelp, ftarget-help, and fversion options that do not take
> arguments ignore the "-no" prefix so that even "-fno-help" (etc)
> causes help to be printed instead of suppressing help output. Since that
> behavior is not useful, I've added RejectNegative to those options as
> well.
>
> gcc/analyzer/ChangeLog
> PR other/122243
> * analyzer.opt (fanalyzer-verbosity=): Add RejectNegative.
>
> gcc/c-family/ChangeLog
> PR other/122243
> * c.opt: (fdeps-format=): Add RejectNegative.
> (fdeps-file=): Likewise.
> (fdeps-target=): Likewise.
> (Walloc-size-larger-than=): Likewise.
> (Wno-alloc-size-larger-than): Likewise.
In https://bugs.kde.org/show_bug.cgi?id=511972 `valgrind` was noticed to use
'-Wno-alloc-size-larger-than=18446744073709551615'. From what I understand from
the r16-5128-g5b276d38c2fdd7 it's an intentional change in `gcc` to start
rejecting those. Mark suggested to flag it as a possible regression.
I'm not sure what would the better fallback. Some options are:
- warn about unrecognized option and still disable the warning
- just warn about the option and don't disable the warning
- keep things as is and keep failing the builds with unexpected flags
/cc Mark, what would be your preference?
Meanwhile `valgrind` was fixed to pass a valid option:
https://sourceware.org/git/?p=valgrind.git;a=commitdiff;h=51c5973d9d1f096b9472df75638f2a53324fafed