public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "harald at gigawatt dot nl" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/56977] gcc -Og incorrectly warns about 'constant zero length parameter' Date: Sat, 15 Jun 2013 09:59:00 -0000 [thread overview] Message-ID: <bug-56977-4-bDamvG4xU9@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-56977-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56977 --- Comment #2 from Harald van Dijk <harald at gigawatt dot nl> --- Inlining isn't relevant: __attribute__((__error__("error"))) void error (); void f (int i) { if (__builtin_constant_p (i)) { error (); } } fails the same way. But it doesn't fail with all uses of __builtin_constant_p: __attribute__((__error__("error"))) void error (); void f () { int g (); if (!__builtin_constant_p (1)) { error (); } if (__builtin_constant_p (g ())) { error (); } } compiles without any problems.
next prev parent reply other threads:[~2013-06-15 9:59 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-04-16 11:09 [Bug c/56977] New: " baugesta at cisco dot com 2013-06-13 19:23 ` [Bug c/56977] " harald at gigawatt dot nl 2013-06-15 9:59 ` harald at gigawatt dot nl [this message] 2013-06-16 21:15 ` [Bug middle-end/56977] " pinskia at gcc dot gnu.org 2013-06-17 10:09 ` rguenth at gcc dot gnu.org 2013-06-25 8:22 ` rguenth at gcc dot gnu.org 2013-06-27 16:40 ` harald at gigawatt dot nl 2013-07-07 23:05 ` bastiaan at bjacques dot org 2013-08-28 8:30 ` rguenth 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-56977-4-bDamvG4xU9@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).