From 8b3b26f77c2254fab493d7250c07ef505d1d6b31 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Mon, 2 Apr 2018 23:36:21 +0000 Subject: [PATCH] invoke.texi (-Wrestrict): Fix typos. gcc/ChangeLog: * doc/invoke.texi (-Wrestrict): Fix typos. From-SVN: r259020 --- gcc/ChangeLog | 4 ++++ gcc/doc/invoke.texi | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 293df9a..eef2a6f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2018-04-02 Martin Sebor + + * doc/invoke.texi (-Wrestrict): Fix typos. + 2018-04-02 Jim Wilson * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 4dc935d..bb52f55 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -6825,13 +6825,16 @@ the call writes the terminating NUL into @code{a[4]}, the copies overlap and the call is diagnosed. @smallexample -struct foo +void foo (void) @{ char a[] = "abcd1234"; strcpy (a, a + 4); -@}; + … +@} @end smallexample -The @option{-Wrestrict} is included in @option{-Wall}. +The @option{-Wrestrict} option detects some instances of simple overlap +even without optimization but works best at @option{-O2}. It is included +in @option{-Wall}. @item -Wnested-externs @r{(C and Objective-C only)} @opindex Wnested-externs -- 2.7.4