Hi Joseph, On Mon, Feb 26, 2024 at 03:24:32PM +0000, Joseph Myers wrote: > On Sun, 25 Feb 2024, Mike Stump wrote: > > > On Feb 6, 2024, at 2:45 AM, Alejandro Colomar wrote: > > > > > > Warn about the following: > > > > > > char s[3] = "foo"; > > > > No ObjC specific impact here, so no need for ObjC review. > > > > As a member of the peanut gallery, I like the patch. > > > > Joseph, this is been submitted 5 times over the past year. Any thoughts? > > The idea seems reasonable, but the patch needs documentation for the new > option in invoke.texi. Thanks! Will do. I don't see an obvious order in that file. Where would you put the option? Do you want me to sort(1) it first, and then insert the new option in alphabetic order? $ man gcc 2>/dev/null | grep -e '^ \{0,3\}[^ ]' -e '^ \{4,7\}-' | sed -n '/^ \{1,3\}Options to Request or Suppress Warnings/,/^ \{1,3\}[^ ]/p' Options to Request or Suppress Warnings -fsyntax-only -fmax-errors=n -w Inhibit all warning messages. -Werror -Werror= -Wfatal-errors -Wno- options with old compilers, but if something goes wrong, the compiler warns that an unrecognized option is present. -Wpedantic -pedantic -pedantic-errors -Wall -Wextra -Wabi (C, Objective‐C, C++ and Objective-C++ only) -Wno-changes-meaning (C++ and Objective-C++ only) -Wchar-subscripts -Wno-coverage-mismatch -Wno-coverage-invalid-line-number -Wno-cpp (C, Objective‐C, C++, Objective-C++ and Fortran only) -Wdouble-promotion (C, C++, Objective‐C and Objective-C++ only) -Wduplicate-decl-specifier (C and Objective‐C only) -Wformat -Wformat=n -Wno-format-contains-nul -Wno-format-extra-args -Wformat-overflow -Wformat-overflow=level -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -Wformat-signedness -Wformat-truncation -Wformat-truncation=level -Wformat-y2k -Wnonnull -Wnonnull-compare -Wnull-dereference -Winfinite-recursion -Winit-self (C, C++, Objective‐C and Objective-C++ only) -Wno-implicit-int (C and Objective‐C only) -Wno-implicit-function-declaration (C and Objective‐C only) -Wimplicit (C and Objective‐C only) -Wimplicit-fallthrough -Wimplicit-fallthrough=n -Wno-if-not-aligned (C, C++, Objective‐C and Objective-C++ only) -Wignored-qualifiers (C and C++ only) -Wno-ignored-attributes (C and C++ only) -Wmain -Wmisleading-indentation (C and C++ only) -Wmissing-attributes -Wmissing-braces -Wmissing-include-dirs (C, C++, Objective‐C, Objective-C++ and Fortran only) -Wno-missing-profile -Wmismatched-dealloc -Wmultistatement-macros -Wparentheses -Wno-self-move (C++ and Objective-C++ only) -Wsequence-point -Wno-return-local-addr -Wreturn-type -Wno-shift-count-negative -Wno-shift-count-overflow -Wshift-negative-value -Wno-shift-overflow -Wshift-overflow=n -Wswitch -Wswitch-default -Wswitch-enum -Wno-switch-bool -Wno-switch-outside-range -Wno-switch-unreachable -Wsync-nand (C and C++ only) -Wtrivial-auto-var-init -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs (C, Objective‐C, C++ and Objective-C++ only) -Wunused-parameter -Wno-unused-result -Wunused-variable -Wunused-const-variable -Wunused-const-variable=n -Wunused-value -Wunused -Wuninitialized -Wno-invalid-memory-model -Wmaybe-uninitialized -Wunknown-pragmas -Wno-pragmas -Wno-prio-ctor-dtor -Wstrict-aliasing -Wstrict-aliasing=n -Wstrict-overflow -Wstrict-overflow=n -Wstring-compare -Wno-stringop-overflow -Wstringop-overflow -Wstringop-overflow=type -Wno-stringop-overread -Wno-stringop-truncation -Wstrict-flex-arrays -Wsuggest-attribute=[pure|const|noreturn|format|cold|malloc] -Walloc-zero -Walloc-size-larger-than=byte‐size -Wno-alloc-size-larger-than -Walloca -Walloca-larger-than=byte‐size -Wno-alloca-larger-than -Warith-conversion -Warray-bounds -Warray-bounds=n -Warray-compare -Warray-parameter -Warray-parameter=n -Wattribute-alias=n -Wno-attribute-alias -Wbidi-chars=[none|unpaired|any|ucn] -Wbool-compare -Wbool-operation -Wduplicated-branches -Wduplicated-cond -Wframe-address -Wno-discarded-qualifiers (C and Objective‐C only) -Wno-discarded-array-qualifiers (C and Objective‐C only) -Wno-incompatible-pointer-types (C and Objective‐C only) -Wno-int-conversion (C and Objective‐C only) -Wzero-length-bounds -Wno-div-by-zero -Wsystem-headers -Wtautological-compare -Wtrampolines -Wfloat-equal -Wtraditional (C and Objective‐C only) -Wtraditional-conversion (C and Objective‐C only) -Wdeclaration-after-statement (C and Objective‐C only) -Wshadow -Wno-shadow-ivar (Objective‐C only) -Wshadow=global -Wshadow=local -Wshadow=compatible-local -Wlarger-than=byte‐size -Wno-larger-than -Wframe-larger-than=byte‐size -Wno-frame-larger-than -Wfree-nonheap-object -Wstack-usage=byte‐size -Wno-stack-usage -Wunsafe-loop-optimizations -Wno-pedantic-ms-format (MinGW targets only) -Wpointer-arith -Wno-pointer-compare -Wtsan -Wtype-limits -Wabsolute-value (C and Objective‐C only) -Wcomment -Wcomments -Wtrigraphs -Wundef -Wexpansion-to-defined -Wunused-macros -Wno-endif-labels -Wbad-function-cast (C and Objective‐C only) -Wc90-c99-compat (C and Objective‐C only) -Wc99-c11-compat (C and Objective‐C only) -Wc11-c2x-compat (C and Objective‐C only) -Wc++-compat (C and Objective‐C only) -Wc++11-compat (C++ and Objective-C++ only) -Wc++14-compat (C++ and Objective-C++ only) -Wc++17-compat (C++ and Objective-C++ only) -Wc++20-compat (C++ and Objective-C++ only) -Wno-c++11-extensions (C++ and Objective-C++ only) -Wno-c++14-extensions (C++ and Objective-C++ only) -Wno-c++17-extensions (C++ and Objective-C++ only) -Wno-c++20-extensions (C++ and Objective-C++ only) -Wno-c++23-extensions (C++ and Objective-C++ only) -Wcast-qual -Wcast-align -Wcast-align=strict -Wcast-function-type -Wwrite-strings -Wclobbered -Wno-complain-wrong-lang -Wconversion -Wdangling-else -Wdangling-pointer -Wdangling-pointer=n -Wdate-time -Wempty-body -Wno-endif-labels -Wenum-compare -Wenum-conversion -Wenum-int-mismatch (C and Objective‐C only) -Wjump-misses-init (C, Objective‐C only) -Wsign-compare -Wsign-conversion -Wfloat-conversion -Wno-scalar-storage-order -Wsizeof-array-div -Wsizeof-pointer-div -Wsizeof-pointer-memaccess -Wno-sizeof-array-argument -Wmemset-elt-size -Wmemset-transposed-args -Waddress -Wno-address-of-packed-member -Wlogical-op -Wlogical-not-parentheses -Waggregate-return -Wno-aggressive-loop-optimizations -Wno-attributes -Wno-builtin-declaration-mismatch -Wno-builtin-macro-redefined -Wstrict-prototypes (C and Objective‐C only) -Wold-style-declaration (C and Objective‐C only) -Wold-style-definition (C and Objective‐C only) -Wmissing-parameter-type (C and Objective‐C only) -Wmissing-prototypes (C and Objective‐C only) -Wmissing-declarations -Wmissing-field-initializers -Wno-missing-requires -Wno-missing-template-keyword -Wno-multichar -Wnormalized=[none|id|nfc|nfkc] -Wno-attribute-warning -Wno-deprecated -Wno-deprecated-declarations -Wno-overflow -Wno-odr -Wopenacc-parallelism -Wopenmp-simd -Woverride-init (C and Objective‐C only) -Wno-override-init-side-effects (C and Objective‐C only) -Wpacked -Wnopacked-bitfield-compat -Wpacked-not-aligned (C, C++, Objective‐C and Objective-C++ only) -Wpadded -Wredundant-decls -Wrestrict -Wnested-externs (C and Objective‐C only) -Winline -Winterference-size -Wint-in-bool-context -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast (C and Objective‐C only) -Winvalid-pch -Winvalid-utf8 -Wno-unicode -Wlong-long -Wvariadic-macros -Wno-varargs -Wvector-operation-performance -Wvla -Wvla-larger-than=byte‐size -Wno-vla-larger-than -Wvla-parameter -Wvolatile-register-var -Wxor-used-as-pow (C, C++, Objective‐C and Objective-C++ only) -Wdisabled-optimization -Wpointer-sign (C and Objective‐C only) -Wstack-protector -Woverlength-strings -Wunsuffixed-float-constants (C and Objective‐C only) -Wno-lto-type-mismatch -Wno-designated-init (C and Objective‐C only) Options That Control Static Analysis Have a lovely day! Alex -- Looking for a remote C programming job at the moment.