diff mbox

[doc,committed] copy-edit documentation for -fisolate-erroneous-paths-*

Message ID 54A8907C.8040809@codesourcery.com
State New
Headers show

Commit Message

Sandra Loosemore Jan. 4, 2015, 12:59 a.m. UTC
This patch fixes a bunch of small problems in the descriptions of 
-fisolate-erroneous-paths-dereference and 
-fisolate-erroneous-paths-attribute:

* "which"/"that" confusion
* use American spelling of "behavior" vs British "behaviour"
* most places in the manual use "null" or more rarely "@code{NULL}" 
rather than "NULL"
* wrong markup on option

I also added a note that -fisolate-erroneous-paths-dereference is 
enabled by default at -O2 since it seemed odd to mention only that the 
other option is *not* enabled.

Committed under the obvious fix rule, since this is more boring 
tech-writer stuff.

-Sandra


2015-01-03  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* doc/invoke.texi ([-fisolate-erroneous-paths-dereference]):
	Copy-edit description.
	([-fisolate-erroneous-paths-attribute]): Likewise.
	* common.opt (fisolate-erroneous-paths-dereference):
	Copy-edit description.
	(fisolate-erroneous-paths-attribute): Likewise.

Comments

Gerald Pfeifer Jan. 25, 2015, 11:10 p.m. UTC | #1
On Saturday 2015-01-03 17:59, Sandra Loosemore wrote:
> * most places in the manual use "null" or more rarely "@code{NULL}" 
> rather than "NULL"

So, should this be documented in gcc.gnu.org/codingconventions.html?

Joseph?

Gerald
Joseph Myers Jan. 26, 2015, 7:12 p.m. UTC | #2
On Mon, 26 Jan 2015, Gerald Pfeifer wrote:

> On Saturday 2015-01-03 17:59, Sandra Loosemore wrote:
> > * most places in the manual use "null" or more rarely "@code{NULL}" 
> > rather than "NULL"
> 
> So, should this be documented in gcc.gnu.org/codingconventions.html?

Expanding / revising where it says "NULL should be written as 
<code>@code{NULL}</code>" (to exclude use of plain un-marked-up NULL)?

(I think natural logic is something like: "null" as an adjective, e.g. 
"null pointer", @code{NULL} (or e.g. @code{NULL_TREE}) if naming a 
specific value, no use of un-marked-up "NULL".  But I'm not sure there's a 
real distinction between e.g. "the value is non-null" and "the value is 
non-@code{NULL}", so that doesn't actually say which to use in such 
cases.)
diff mbox

Patch

Index: gcc/common.opt
===================================================================
--- gcc/common.opt	(revision 219165)
+++ gcc/common.opt	(working copy)
@@ -2241,16 +2241,16 @@  Enable string length optimizations on tr
 
 fisolate-erroneous-paths-dereference
 Common Report Var(flag_isolate_erroneous_paths_dereference) Optimization
-Detect paths which trigger erroneous or undefined behaviour due to
-dereferencing a NULL pointer.  Isolate those paths from the main control
-flow and turn the statement with erroneous or undefined behaviour into a trap.
+Detect paths that trigger erroneous or undefined behavior due to
+dereferencing a null pointer.  Isolate those paths from the main control
+flow and turn the statement with erroneous or undefined behavior into a trap.
 
 fisolate-erroneous-paths-attribute
 Common Report Var(flag_isolate_erroneous_paths_attribute) Optimization
-Detect paths which trigger erroneous or undefined behaviour due a NULL value
-being used in a way which is forbidden by a returns_nonnull or nonnull
+Detect paths that trigger erroneous or undefined behavior due a null value
+being used in a way forbidden by a returns_nonnull or nonnull
 attribute.  Isolate those paths from the main control flow and turn the
-statement with erroneous or undefined behaviour into a trap. 
+statement with erroneous or undefined behavior into a trap. 
 
 ftree-loop-distribution
 Common Report Var(flag_tree_loop_distribution) Optimization
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 219166)
+++ gcc/doc/invoke.texi	(working copy)
@@ -8234,17 +8234,18 @@  This flag is enabled by default at @opti
 
 @item -fisolate-erroneous-paths-dereference
 @opindex fisolate-erroneous-paths-dereference
-Detect paths which trigger erroneous or undefined behaviour due to
-dereferencing a NULL pointer.  Isolate those paths from the main control
-flow and turn the statement with erroneous or undefined behaviour into a trap.
+Detect paths that trigger erroneous or undefined behavior due to
+dereferencing a null pointer.  Isolate those paths from the main control
+flow and turn the statement with erroneous or undefined behavior into a trap.
+This flag is enabled by default at @option{-O2} and higher.
 
 @item -fisolate-erroneous-paths-attribute
 @opindex fisolate-erroneous-paths-attribute
-Detect paths which trigger erroneous or undefined behaviour due a NULL value
-being used in a way which is forbidden by a @code{returns_nonnull} or @code{nonnull}
+Detect paths that trigger erroneous or undefined behavior due a null value
+being used in a way forbidden by a @code{returns_nonnull} or @code{nonnull}
 attribute.  Isolate those paths from the main control flow and turn the
-statement with erroneous or undefined behaviour into a trap.  This is not
-currently enabled, but may be enabled by @code{-O2} in the future.
+statement with erroneous or undefined behavior into a trap.  This is not
+currently enabled, but may be enabled by @option{-O2} in the future.
 
 @item -ftree-sink
 @opindex ftree-sink