From: Martin Sebor Date: Mon, 2 Apr 2018 23:36:21 +0000 (+0000) Subject: invoke.texi (-Wrestrict): Fix typos. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b3b26f77c2254fab493d7250c07ef505d1d6b31;p=gcc.git invoke.texi (-Wrestrict): Fix typos. gcc/ChangeLog: * doc/invoke.texi (-Wrestrict): Fix typos. From-SVN: r259020 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 293df9a9878..eef2a6f98db 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 4dc935d98c0..bb52f556237 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