public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/43728] Warning for redundant static function prototypes Date: Wed, 14 Apr 2010 16:06:00 -0000 [thread overview] Message-ID: <20100414160629.19436.qmail@sourceware.org> (raw) In-Reply-To: <bug-43728-87@http.gcc.gnu.org/bugzilla/> ------- Comment #6 from jakub at gcc dot gnu dot org 2010-04-14 16:06 ------- Created an attachment (id=20378) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20378&action=view) gcc46-pr43728.patch Updated patch. There are still cases I'm unsure about. E.g. for: static void g (); void f() { void g(); g(); } void g() { } int main () { f (); } with -Wredundant-decls=2 in C we complain (even with -Wredundant-decls alone and before the patch) that void g(); in f function is redundant declaration, but in C++ we don't and instead with -Wredundant-decls=2 the warning newly diagnoses the first static void g (); prototype as redundant (in this case it isn't, because it affects whether void g (); in the subroutine is static or not). Not sure why TREE_USED isn't set in C++ case during the g call in f, Jason? -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20367|0 |1 is obsolete| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43728
next prev parent reply other threads:[~2010-04-14 16:06 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-04-12 15:06 [Bug c/43728] New: " jakub at gcc dot gnu dot org 2010-04-12 15:15 ` [Bug c/43728] " jakub at gcc dot gnu dot org 2010-04-12 15:16 ` jakub at gcc dot gnu dot org 2010-04-12 15:38 ` manu at gcc dot gnu dot org 2010-04-12 16:17 ` jason at gcc dot gnu dot org 2010-04-12 16:29 ` jakub at gcc dot gnu dot org 2010-04-14 16:06 ` jakub at gcc dot gnu dot org [this message] 2010-04-14 20:26 ` jason at gcc dot gnu dot 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=20100414160629.19436.qmail@sourceware.org \ --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).