diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-09-24 21:56:23 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-10-01 00:46:44 +0200 |
| commit | 02ed28909f3b79e0ad1ca57b9699f39e1bb7cdcf (patch) | |
| tree | ce2af5f765a2960b40aa3a8f1e555ceec04d5611 /sparse.1 | |
| parent | 8b187dd493fb934f38061d9ee265a888a6b4b776 (diff) | |
| download | sparse-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.1 | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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. |
