public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "david at westcontrol dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/61579] -Wwrite-strings does not behave as a warning option Date: Wed, 22 Jul 2020 13:22:37 +0000 [thread overview] Message-ID: <bug-61579-4-pLjqJ4Giid@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-61579-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61579 David Brown <david at westcontrol dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david at westcontrol dot com --- Comment #7 from David Brown <david at westcontrol dot com> --- Could "-Wwrite-strings" be split into two options? The warning could remain (and become part of -Wall for C as well as C++) if the compiler can spot and warn about attempts to write to string literals, while keeping these of type "char[len]" as required by C. A new option "-fconst-strings" could be put under "Code Gen Options" which makes C string literals be type "const char[len]" for those that want it, encouraging a slightly safer code style that is not standard C.
next prev parent reply other threads:[~2020-07-22 13:22 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-06-21 11:34 [Bug c/61579] New: " bugdal at aerifal dot cx 2014-06-21 15:45 ` [Bug c/61579] " manu at gcc dot gnu.org 2014-07-22 16:50 ` mpolacek at gcc dot gnu.org 2020-07-22 13:22 ` david at westcontrol dot com [this message] 2020-07-22 13:42 ` manu at gcc dot gnu.org 2020-07-22 17:32 ` msebor at gcc dot gnu.org
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=bug-61579-4-pLjqJ4Giid@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).