https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117967
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
CC| |mpolacek at gcc dot gnu.org
Last reconfirmed| |2024-12-09
Ever confirmed|0 |1
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
You're right that -Wno-hardened should suppress the warning and it doesn't.
The problem is that warn_hardened is not yet usable in:
/* We can't use OPT_Whardened yet. Sigh. */
else if (warn_hardened)
warning_at (UNKNOWN_LOCATION, 0,
"linker hardening options not enabled by %<-fhardened%> "
"because other link options were specified on the command "
"line");