Implement -Wpurge= (#1443)

This commit is contained in:
Sylvie
2024-08-05 12:50:48 -04:00
committed by GitHub
parent f304e1dd7f
commit 2f8f99bd94
14 changed files with 59 additions and 10 deletions

View File

@@ -309,6 +309,18 @@ or just
warns about strings longer than four characters, since four or fewer characters fit within a 32-bit integer.
.Fl Wnumeric-string=2
warns about any multi-character string.
.It Fl Wpurge=
Warn when purging symbols which are likely to have been necessary.
.Fl Wpurge=0
or
.Fl Wno-purge
disables this warning.
.Fl Wpurge=1
or just
.Fl Wpurge
warns when purging any exported symbol (regardless of type).
.Fl Wpurge=2
also warns when purging any label (even if not exported).
.It Fl Wshift
Warn when shifting right a negative value.
Use a division by 2**N instead.