Skip to content

Commit 76dcd10

Browse files
committed
Use consistent wording for options treating obsolete C constructs as errors
Signed-off-by: Thomas Nyman <[email protected]>
1 parent 746a2f6 commit 76dcd10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ When compiling code in any of the situations in the below table, add the corresp
4242
| for x86_64 | `-fcf-protection=full` |
4343
| for aarch64 | `-mbranch-protection=standard` |
4444
| for production code | `-fno-delete-null-pointer-checks -fno-strict-overflow -fno-strict-aliasing -ftrivial-auto-var-init=zero` |
45-
| for disabling obsolete C constructs | `-Werror=implicit -Werror=incompatible-pointer-types -Werror=int-conversion` |
45+
| for treating obsolete C constructs as errors | `-Werror=implicit -Werror=incompatible-pointer-types -Werror=int-conversion` |
4646

4747
We recommend developers to additionally use a blanket [`-Werror`](#-Werror) to treat all warnings as errors during development. However, `-Werror` should not be used in this blanket form when distributing source code, as this use of `-Werror` creates a dependency on specific toolchain vendors and versions. The selective form[`-Werror=`*`<warning-flag>`*](#-Werror-flag) that promotes specific warnings as error in cases that should never occur in the code can be used both during development and when distributing sources. For example, we encourage developers to promote warnings regarding obsolete C constructs removed by the 1999 C standard to errors (see the "for disabling obsolete C constructs" in the above table). These options often cannot be added by those who independently build the software, because the options may require non-trivial changes to the source code.
4848

@@ -397,7 +397,7 @@ Zero-warning policies can also be enforced at CI level. CI-based zero- or bounde
397397

398398
---
399399

400-
### Disable obsolete C constructs
400+
### Treat obsolete C constructs as errors
401401

402402
| Compiler Flag | Supported since | Description |
403403
|:----------------------------------------------------------------------------------------- |:--------------------------:|:-------------------------------------------------------------------------------------------------|

0 commit comments

Comments
 (0)