public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/64440] -Wdiv-by-zero false negative on const variables Date: Wed, 07 Jan 2015 08:22:00 -0000 [thread overview] Message-ID: <bug-64440-4-TwIDIFIaZB@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-64440-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64440 --- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Wed Jan 7 08:21:50 2015 New Revision: 219279 URL: https://gcc.gnu.org/viewcvs?rev=219279&root=gcc&view=rev Log: PR c/64440 * c-common.c (c_fully_fold_internal): Warn for division and modulo if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero. * gcc.dg/pr64440.c: New test. * c-c++-common/pr56607.c: Don't limit dg-warnings to C++. Added: trunk/gcc/testsuite/gcc.dg/pr64440.c Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-common.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/c-c++-common/pr56607.c
prev parent reply other threads:[~2015-01-07 8:22 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-12-30 2:27 [Bug c/64440] New: " chengniansun at gmail dot com 2014-12-30 3:01 ` [Bug c/64440] " pinskia at gcc dot gnu.org 2014-12-30 7:53 ` chengniansun at gmail dot com 2014-12-30 12:31 ` manu at gcc dot gnu.org 2015-01-06 15:23 ` mpolacek at gcc dot gnu.org 2015-01-06 16:07 ` mpolacek at gcc dot gnu.org 2015-01-07 8:22 ` mpolacek at gcc dot gnu.org 2015-01-07 8:22 ` mpolacek at gcc dot gnu.org [this message]
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-64440-4-TwIDIFIaZB@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).