I was going to correct the fact that this list of options enabled by
-Wextra doesn't mention that -Wunterminated-string-initialization is
only valid for C and ObjC:
@gccoptlist{-Wabsolute-value @r{(only for C/ObjC)}
-Walloc-size
-Wcalloc-transposed-args
-Wcast-function-type
-Wclobbered
-Wdangling-reference @r{(C++ only)}
-Wdeprecated-copy @r{(C++ and Objective-C++ only)}
-Wempty-body
-Wenum-conversion @r{(only for C/ObjC)}
-Wexpansion-to-defined
-Wignored-qualifiers @r{(only for C/C++)}
-Wimplicit-fallthrough=3
-Wmaybe-uninitialized
-Wmissing-field-initializers
-Wmissing-parameter-name @r{(C/ObjC only)}
-Wmissing-parameter-type @r{(C/ObjC only)}
-Wold-style-declaration @r{(C/ObjC only)}
-Woverride-init @r{(C/ObjC only)}
-Wredundant-move @r{(C++ and Objective-C++ only)}
-Wshift-negative-value @r{(in C++11 to C++17 and in C99 and newer)}
-Wsign-compare @r{(C++ and Objective-C++ only)}
-Wsized-deallocation @r{(C++ and Objective-C++ only)}
-Wstring-compare
-Wtype-limits
-Wuninitialized
-Wunterminated-string-initialization
-Wunused-parameter @r{(only with} @option{-Wunused} @r{or} @option{-Wall}@r{)}
-Wunused-but-set-parameter @r{(only with} @option{-Wunused} @r{or}
@option{-Wall}@r{)}}
But then I noticed that the "only" parentheticals are wildly
inconsistent. We have:
only for C/ObjC
C++ and Objective-C++ only
C/ObjC only
It would be good if we used the same form every time. In the
documentation for individual options we always use the (X and Y only)
form, and the list of options for -Wall _mostly_ uses that form (with
a few exceptions that use the "only for C/ObjC" form).
I can see an argument for keeping those lists a bit more concise (so
"only for X/Y" rather than "X and Y only") but we should pick a form
and be locally consistent.
Should I change those to all use the full "X and Y only" form that is
used on docs for the individual options, and always spell out
Objective-C in full? i.e. replace all "only for X/Y" and "X/Y only"
cases?