aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Uecker <uecker@tugraz.at>2025-03-30 13:07:24 +0200
committerMartin Uecker <uecker@gcc.gnu.org>2025-04-01 12:53:13 +0200
commit182d891e13c78187f5e4f76512e03297fea0e56a (patch)
tree949b6dc55f13c9146159b13a04951b9cd1eb5dfb /gcc
parentb8de7704428dfe008d195d8da95d6772153b0cc7 (diff)
downloadgcc-182d891e13c78187f5e4f76512e03297fea0e56a.zip
gcc-182d891e13c78187f5e4f76512e03297fea0e56a.tar.gz
gcc-182d891e13c78187f5e4f76512e03297fea0e56a.tar.bz2
Doc: -Wzero-as-null-pointer-constant is also available for C [PR119173]
The warning -Wzero-as-null-pointer-constant is now not only supported in C++ but also in C. Change the documentation accordingly. PR c/119173 gcc/ChangeLog: * doc/invoke.texi (Warning Options): Move to general options.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/doc/invoke.texi13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index ab4867c..b1a0d93 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -274,7 +274,7 @@ in the following sections.
-Wsuggest-final-types -Wsuggest-override -Wno-template-body
-Wno-template-id-cdtor -Wtemplate-names-tu-local
-Wno-terminate -Wno-vexing-parse -Wvirtual-inheritance
--Wno-virtual-move-assign -Wvolatile -Wzero-as-null-pointer-constant}
+-Wno-virtual-move-assign -Wvolatile}
@item Objective-C and Objective-C++ Language Options
@xref{Objective-C and Objective-C++ Dialect Options,,Options Controlling
@@ -442,6 +442,7 @@ Objective-C and Objective-C++ Dialects}.
-Wvla -Wvla-larger-than=@var{byte-size} -Wno-vla-larger-than
-Wvolatile-register-var -Wwrite-strings
-Wno-xor-used-as-pow
+-Wzero-as-null-pointer-constant
-Wzero-length-bounds}
@item Static Analyzer Options
@@ -4690,11 +4691,6 @@ non-class type, @code{volatile}-qualified function return type,
Enabled by default with @option{-std=c++20}. Before
@option{-std=c++20}, enabled with explicit @option{-Wdeprecated}.
-@opindex Wzero-as-null-pointer-constant
-@opindex Wno-zero-as-null-pointer-constant
-@item -Wzero-as-null-pointer-constant
-Warn when a literal @samp{0} is used as null pointer constant.
-
@opindex Waligned-new
@opindex Wno-aligned-new
@item -Waligned-new
@@ -8920,6 +8916,11 @@ error alone, with @option{-Wno-error=int-conversion}.
This warning is upgraded to an error by @option{-pedantic-errors}.
+@opindex Wzero-as-null-pointer-constant
+@opindex Wno-zero-as-null-pointer-constant
+@item -Wzero-as-null-pointer-constant
+Warn when a literal @samp{0} is used as null pointer constant.
+
@opindex Wzero-length-bounds
@opindex Wzero-length-bounds
@item -Wzero-length-bounds