From d28e5b145f2f667ea6712ff332a3d449dde3d495 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Mon, 13 Apr 2020 16:31:09 -0600 Subject: [PATCH] Update and correct documentation of -Wall and -Wrestrict. gcc/ChangeLog: * doc/extend.texi (-Wall): Mention -Wformat-overflow and -Wformat-truncation. Move -Wzero-length-bounds last. (-Wrestrict): Document positive form of option enabled by -Wall. --- gcc/ChangeLog | 6 ++++++ gcc/doc/invoke.texi | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b847edded0..726e629188a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2020-04-13 Martin Sebor + + * doc/extend.texi (-Wall): Mention -Wformat-overflow and + -Wformat-truncation. Move -Wzero-length-bounds last. + (-Wrestrict): Document positive form of option enabled by -Wall. + 2020-04-13 Zachary Spytz * doc/extend.texi: Add realloc to list of built-in functions diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index be7b5bb7d71..3bb95ffd220 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -4835,12 +4835,13 @@ Options} and @ref{Objective-C and Objective-C++ Dialect Options}. -Wenum-compare @r{(in C/ObjC; this is on by default in C++)} @gol -Wenum-conversion @r{in C/ObjC;} @gol -Wformat @gol +-Wformat-overflow @gol +-Wformat-truncation @gol -Wint-in-bool-context @gol -Wimplicit @r{(C and Objective-C only)} @gol -Wimplicit-int @r{(C and Objective-C only)} @gol -Wimplicit-function-declaration @r{(C and Objective-C only)} @gol -Winit-self @r{(only for C++)} @gol --Wzero-length-bounds @gol -Wlogical-not-parentheses @gol -Wmain @r{(only for C/ObjC and unless} @option{-ffreestanding}@r{)} @gol -Wmaybe-uninitialized @gol @@ -4875,7 +4876,8 @@ Options} and @ref{Objective-C and Objective-C++ Dialect Options}. -Wunused-label @gol -Wunused-value @gol -Wunused-variable @gol --Wvolatile-register-var} +-Wvolatile-register-var @gol +-Wzero-length-bounds} Note that some warning flags are not implied by @option{-Wall}. Some of them warn about constructions that users generally do not consider @@ -8004,7 +8006,7 @@ reduce the padding and so make the structure smaller. Warn if anything is declared more than once in the same scope, even in cases where multiple declaration is valid and changes nothing. -@item -Wno-restrict +@item -Wrestrict @opindex Wrestrict @opindex Wno-restrict Warn when an object referenced by a @code{restrict}-qualified parameter -- 2.30.2