public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [WIP] Have -Wpointer-sign be enabled by -Wextra, too [PR109836]
@ 2023-05-30 21:42 Eric Gallager
  2023-08-09  0:17 ` [PATCH v2] " Eric Gallager
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Gallager @ 2023-05-30 21:42 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 514 bytes --]

PR109836 is a request to have -Wpointer-sign enabled by default. There
were points of disagreement raised in the bug report, so I figured
that maybe as a compromise, the warning could just be enabled by
-Wextra, as well (I have in fact seen some projects that enable
-Wextra but not -Wall). This patch would implement my suggestion of
adding it to -Wextra, but it's not ready to commit yet, as it still
needs testing, documentation, and a ChangeLog entry. I'm just posting
it here as an RFC; what do people think?

[-- Attachment #2: patch-gcc_c-family_c.opt.diff --]
[-- Type: application/octet-stream, Size: 551 bytes --]

diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 0d0ad0a6374..f046d91d03b 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1178,7 +1178,7 @@ C ObjC C++ ObjC++ Var(warn_pointer_arith) Warning LangEnabledBy(C ObjC C++ ObjC+
 Warn about function pointer arithmetic.
 
 Wpointer-sign
-C ObjC Var(warn_pointer_sign) Warning LangEnabledBy(C ObjC,Wall || Wpedantic)
+C ObjC Var(warn_pointer_sign) Warning LangEnabledBy(C ObjC,Wall || Wpedantic || Wextra)
 Warn when a pointer differs in signedness in an assignment.
 
 Wpointer-compare

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-17 14:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-30 21:42 [WIP] Have -Wpointer-sign be enabled by -Wextra, too [PR109836] Eric Gallager
2023-08-09  0:17 ` [PATCH v2] " Eric Gallager
2023-08-16 21:33   ` [PING] " Eric Gallager
2023-08-17 14:54     ` Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).