aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sparse.1
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-09-24 21:56:23 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-01 00:46:44 +0200
commit02ed28909f3b79e0ad1ca57b9699f39e1bb7cdcf (patch)
treece2af5f765a2960b40aa3a8f1e555ceec04d5611 /sparse.1
parent8b187dd493fb934f38061d9ee265a888a6b4b776 (diff)
downloadsparse-dev-02ed28909f3b79e0ad1ca57b9699f39e1bb7cdcf.tar.gz
flex-array: warn on flexible array in nested aggregate types
A structure or a union containing another aggregate type containing, possibly recursively, a flexible array is quite error prone and make not much sense. So, add an option -Wflexible-array-nested to warn on such usage. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'sparse.1')
-rw-r--r--sparse.17
1 files changed, 7 insertions, 0 deletions
diff --git a/sparse.1 b/sparse.1
index c1a74153..9b1a59c6 100644
--- a/sparse.1
+++ b/sparse.1
@@ -264,6 +264,13 @@ Sparse issues these warnings by default. To turn them off, use
\fB-Wno-flexible-array-array\fR.
.
.TP
+.B -Wflexible-array-nested
+Warn about structures containing a flexible array being contained into
+another structure, union or array.
+
+Sparse does not issue these warnings by default.
+.
+.TP
.B -Wflexible-array-sizeof
Warn about using the sizeof operator on a structure containing a flexible array,
possibly recursively.