diff mbox series

[doc] fix minor typos in -Wmemset-transposed-args

Message ID 3b0e59f9-916e-3275-794b-22b6d3cc01d7@gmail.com
State New
Headers show
Series [doc] fix minor typos in -Wmemset-transposed-args | expand

Commit Message

Martin Sebor Jan. 4, 2019, 4:13 a.m. UTC
The attached patch corrects a couple of minor typos in the description
of -Wmemset-transposed-args.  It also tweaks the text a bit for better
readability.

Martin

Comments

Martin Sebor Jan. 11, 2019, 8:15 p.m. UTC | #1
Ping: https://gcc.gnu.org/ml/gcc-patches/2019-01/msg00139.html

On 1/3/19 9:13 PM, Martin Sebor wrote:
> The attached patch corrects a couple of minor typos in the description
> of -Wmemset-transposed-args.  It also tweaks the text a bit for better
> readability.
> 
> Martin
Jeff Law Jan. 11, 2019, 8:17 p.m. UTC | #2
On 1/3/19 9:13 PM, Martin Sebor wrote:
> The attached patch corrects a couple of minor typos in the description
> of -Wmemset-transposed-args.  It also tweaks the text a bit for better
> readability.
> 
> Martin
> 
> gcc-doc-memset-transposed-args.diff
> 
> gcc/ChangeLog:
> 
> 	* invoke.texi (-Wmemset-transposed-args): Fix typos, adjust wording.
OK
jeff
diff mbox series

Patch

gcc/ChangeLog:

	* invoke.texi (-Wmemset-transposed-args): Fix typos, adjust wording.

Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 267568)
+++ gcc/doc/invoke.texi	(working copy)
@@ -6958,14 +6958,15 @@  the element size.  This warning is enabled by @opt
 @item -Wmemset-transposed-args
 @opindex Wmemset-transposed-args
 @opindex Wno-memset-transposed-args
-Warn for suspicious calls to the @code{memset} built-in function, if the
-second argument is not zero and the third argument is zero.  This warns e.g.@:
-about @code{memset (buf, sizeof buf, 0)} where most probably
-@code{memset (buf, 0, sizeof buf)} was meant instead.  The diagnostics
-is only emitted if the third argument is literal zero.  If it is some
-expression that is folded to zero, a cast of zero to some type, etc., 
-it is far less likely that the user has mistakenly exchanged the arguments 
-and no warning is emitted.  This warning is enabled by @option{-Wall}.
+Warn for suspicious calls to the @code{memset} built-in function where
+the second argument is not zero and the third argument is zero.  For
+example, the call @code{memset (buf, sizeof buf, 0)} is diagnosed because
+@code{memset (buf, 0, sizeof buf)} was meant instead.  The diagnostic
+is only emitted if the third argument is a literal zero.  Otherwise, if
+it is an expression that is folded to zero, or a cast of zero to some
+type, it is far less likely that the arguments have been mistakenly
+transposed and no warning is emitted.  This warning is enabled
+by @option{-Wall}.
 
 @item -Waddress
 @opindex Waddress