public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/53562] Add -Werror= support for -D_FORTIFY_SOURCE / __builtin___memcpy_chk Date: Sat, 02 Jun 2012 10:25:00 -0000 [thread overview] Message-ID: <bug-53562-4-WpfrYWdElF@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-53562-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53562 Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu.org --- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-06-02 10:25:01 UTC --- Untested patch: Index: builtins.c =================================================================== --- builtins.c (revision 187627) +++ builtins.c (working copy) @@ -12527,8 +12527,8 @@ if (! integer_all_onesp (size) && tree_int_cst_lt (size, len)) { - warning_at (tree_nonartificial_location (exp), - 0, "%Kcall to %D will always overflow destination buffer", + warning_at (tree_nonartificial_location (exp), OPT_Wfortify_source, + "%Kcall to %D will always overflow destination buffer", exp, get_callee_fndecl (exp)); return NULL_RTX; } Index: common.opt =================================================================== --- common.opt (revision 187627) +++ common.opt (working copy) @@ -539,6 +539,10 @@ Common Var(flag_fatal_errors) Exit on the first error occurred +Wfortify-source +Common Var(warn_fortify_source) Init(1) Warning +Warnings produced by FORTIFY_SOURCE + Wframe-larger-than= You will also need to add something to doc/invoke.texi, Changelog, bootstrap+test and submit to gcc-patches.
next prev parent reply other threads:[~2012-06-02 10:25 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-06-02 9:48 [Bug c/53562] New: " nnk at google dot com 2012-06-02 10:25 ` manu at gcc dot gnu.org [this message] 2014-08-21 0:09 ` [Bug c/53562] " manu at gcc dot gnu.org 2022-11-28 22:16 ` pinskia 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-53562-4-WpfrYWdElF@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).