Add documentation for -Wflex-array-member-not-at-end.
'-Wflex-array-member-not-at-end (C and C++ only)' Warn when a structure containing a C99 flexible array member as the last field is not at the end of another structure. This warning warns e.g. about struct flex { int length; char data[]; }; struct mid_flex { int m; struct flex flex_data; int n; }; gcc/ChangeLog: * doc/invoke.texi (-Wflex-array-member-not-at-end): Document new option.
This commit is contained in:
parent
abf953042a
commit
44e3f39a3d
1 changed files with 13 additions and 0 deletions
|
@ -357,6 +357,7 @@ Objective-C and Objective-C++ Dialects}.
|
|||
-Wempty-body -Wno-endif-labels -Wenum-compare -Wenum-conversion
|
||||
-Wenum-int-mismatch
|
||||
-Werror -Werror=* -Wexpansion-to-defined -Wfatal-errors
|
||||
-Wflex-array-member-not-at-end
|
||||
-Wfloat-conversion -Wfloat-equal -Wformat -Wformat=2
|
||||
-Wno-format-contains-nul -Wno-format-extra-args
|
||||
-Wformat-nonliteral -Wformat-overflow=@var{n}
|
||||
|
@ -9312,6 +9313,18 @@ value, like assigning a signed integer expression to an unsigned
|
|||
integer variable. An explicit cast silences the warning. In C, this
|
||||
option is enabled also by @option{-Wconversion}.
|
||||
|
||||
@opindex Wflex-array-member-not-at-end
|
||||
@opindex Wno-flex-array-member-not-at-end
|
||||
@item -Wflex-array-member-not-at-end @r{(C and C++ only)}
|
||||
Warn when a structure containing a C99 flexible array member as the last
|
||||
field is not at the end of another structure.
|
||||
This warning warns e.g. about
|
||||
|
||||
@smallexample
|
||||
struct flex @{ int length; char data[]; @};
|
||||
struct mid_flex @{ int m; struct flex flex_data; int n; @};
|
||||
@end smallexample
|
||||
|
||||
@opindex Wfloat-conversion
|
||||
@opindex Wno-float-conversion
|
||||
@item -Wfloat-conversion
|
||||
|
|
Loading…
Add table
Reference in a new issue