From: Alejandro Colomar <alx@kernel.org>
To: Joseph Myers <josmyers@redhat.com>
Cc: Mike Stump <mikestump@comcast.net>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH v5 RESEND] C, ObjC: Add -Wunterminated-string-initialization
Date: Mon, 26 Feb 2024 16:56:24 +0100 [thread overview]
Message-ID: <Zdy0rwW0fxgiX5TK@debian> (raw)
In-Reply-To: <60699168-584-3155-a463-4811af5d33fa@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 9709 bytes --]
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 <alx@kernel.org> 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
--
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-02-26 15:56 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 13:39 [PATCH v2] " Alejandro Colomar
2023-03-24 14:53 ` David Malcolm
2023-03-24 17:45 ` Alejandro Colomar
2023-03-24 17:58 ` David Malcolm
2023-04-20 17:17 ` Ping: " Alejandro Colomar
2023-10-01 0:55 ` Alejandro Colomar
2023-10-01 7:37 ` Martin Uecker
2023-10-01 11:35 ` Alejandro Colomar
2023-10-01 11:38 ` [PATCH v3] " Alejandro Colomar
2023-10-01 11:41 ` [PATCH v4] " Alejandro Colomar
2023-10-01 16:24 ` [PATCH v5] " Alejandro Colomar
2023-10-08 13:05 ` Ping: " Alejandro Colomar
2023-11-13 9:55 ` Alejandro Colomar
2024-02-06 10:45 ` [PATCH v5 RESEND] " Alejandro Colomar
2024-02-25 18:10 ` Mike Stump
2024-02-25 19:44 ` Alejandro Colomar
2024-02-26 15:27 ` Joseph Myers
2024-02-26 15:24 ` Joseph Myers
2024-02-26 15:56 ` Alejandro Colomar [this message]
2024-02-26 16:19 ` Joseph Myers
2024-02-26 19:54 ` Sandra Loosemore
2024-02-26 19:32 ` Mike Stump
2024-03-05 20:20 ` [PATCH v6] " Alejandro Colomar
2024-03-05 20:25 ` Alejandro Colomar
2024-03-05 20:33 ` [PATCH v7] " Alejandro Colomar
2024-03-05 22:42 ` Sandra Loosemore
2024-03-06 18:43 ` [PATCH v8] " Alejandro Colomar
2024-05-14 18:16 ` Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zdy0rwW0fxgiX5TK@debian \
--to=alx@kernel.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=josmyers@redhat.com \
--cc=mikestump@comcast.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).