diff options
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index d5a3b6bac6b..6d7bc1e1eec 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -2876,6 +2876,12 @@ This warning can be independently controlled by @option{-Wmissing-field-initializers}. @item +An initialized field without side effects is overridden when using +designated initializers (@pxref{Designated Inits, , Designated +Initializers}). This warning can be independently controlled by +@option{-Woverride-init}. + +@item A function parameter is declared without a type specifier in K&R-style functions: @@ -3302,6 +3308,18 @@ attribute. @opindex Wno-overflow Do not warn about compile-time overflow in constant expressions. +@item -Woverride-init +@opindex Woverride-init +@opindex W +@opindex Wextra +Warn if an initialized field without side effects is overridden when +using designated initializers (@pxref{Designated Inits, , Designated +Initializers}). + +This warning is included in @option{-Wextra}. To get other +@option{-Wextra} warnings without this one, use @samp{-Wextra +-Wno-override-init}. + @item -Wpacked @opindex Wpacked Warn if a structure is given the packed attribute, but the packed |