diff mbox series

[committed] fix a couple of typos in manual

Message ID 02e2e634-de11-3ff6-bf88-85fcd6e32557@gmail.com
State New
Headers show
Series [committed] fix a couple of typos in manual | expand

Commit Message

Martin Sebor April 2, 2018, 11:38 p.m. UTC
I committed r259020 to fix a couple of typos in the documentation
of the -Wrestrict option.  The diff is below for reference.

Martin

Comments

Gerald Pfeifer April 7, 2018, 11:43 p.m. UTC | #1
On Mon, 2 Apr 2018, Martin Sebor wrote:
> I committed r259020 to fix a couple of typos in the documentation
> of the -Wrestrict option.  The diff is below for reference.

> -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}.

Shoulds this read "-O2 or higher"?

(That's an interesting definition of typo, by the way. ;-)  Not 
disputing the change as such, only the ChangeLog entry.)

Gerald
Richard Biener April 8, 2018, 6:31 a.m. UTC | #2
On April 8, 2018 1:43:00 AM GMT+02:00, Gerald Pfeifer <gerald@pfeifer.com> wrote:
>On Mon, 2 Apr 2018, Martin Sebor wrote:
>> I committed r259020 to fix a couple of typos in the documentation
>> of the -Wrestrict option.  The diff is below for reference.
>
>> -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}.
>
>Shoulds this read "-O2 or higher"?

Most certainly. 

>(That's an interesting definition of typo, by the way. ;-)  Not 
>disputing the change as such, only the ChangeLog entry.)
>
>Gerald
Martin Sebor April 8, 2018, 4:34 p.m. UTC | #3
On 04/07/2018 05:43 PM, Gerald Pfeifer wrote:
> On Mon, 2 Apr 2018, Martin Sebor wrote:
>> I committed r259020 to fix a couple of typos in the documentation
>> of the -Wrestrict option.  The diff is below for reference.
>
>> -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}.
>
> Shoulds this read "-O2 or higher"?

I suppose it would be more accurate that way.  I've added it to
both -Wrestrict and -fprintf-return-value in r259224.

> (That's an interesting definition of typo, by the way. ;-)  Not
> disputing the change as such, only the ChangeLog entry.)

The typo was in the example.  (Of course, I managed to introduce
a new one while fixing it...)  The new sentence was incidental.

Martin

PS While looking around for other examples of "-O2 and above"
I came across a number of other similarly incomplete lists of
optimization options.  I posted a separate patch to update those.
diff mbox series

Patch

Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 259019)
+++ gcc/doc/invoke.texi	(working copy)
@@ -6825,13 +6825,16 @@  the call writes the terminating NUL into @code{a[4
  the call is diagnosed.

  @smallexample
-struct foo
+void foo (void)
  @{
    char a[] = "abcd1234";
    strcpy (a, a + 4);
-@};
+  &hellip;
+@}
  @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
Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 259019)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,7 @@ 
+2018-04-02  Martin Sebor  <msebor@redhat.com>
+
+	* doc/invoke.texi (-Wrestrict): Fix typos.
+
  2018-04-02  Jim Wilson  <jimw@sifive.com>

  	* config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.