From: Jakub Jelinek <jakub@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: Richard Biener <richard.guenther@gmail.com>,
"Joseph S. Myers" <joseph@codesourcery.com>,
Marek Polacek <polacek@redhat.com>,
Jan Hubicka <hubicka@ucw.cz>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [C++ PATCH] Fix -Wunused-function (PR debug/66869)
Date: Fri, 29 Jan 2016 10:35:00 -0000 [thread overview]
Message-ID: <20160129103507.GM3017@tucnak.redhat.com> (raw)
In-Reply-To: <56AAD3B6.2060804@redhat.com>
On Thu, Jan 28, 2016 at 09:51:34PM -0500, Jason Merrill wrote:
> On 01/28/2016 03:15 PM, Jakub Jelinek wrote:
> >+ if (TREE_CODE (decl) == FUNCTION_DECL
> >+ && DECL_INITIAL (decl) == 0
> >+ && DECL_EXTERNAL (decl)
> >+ && !TREE_PUBLIC (decl)
> >+ && !DECL_ARTIFICIAL (decl)
> >+ && !TREE_NO_WARNING (decl))
>
> Do we need to check both DECL_INITIAL and DECL_EXTERNAL?
Dunno, but that is what cgraphunit.c does, c-decl.c too,
what the old toplev.c (check_global_declaration_1) did (back to at least
r26593 from ~ 1999), so I think we want some consistency.
Either it is needed, or if it is not needed, then all the spots should
change, not just this one.
I can try to stick there an assert whether for FUNCTION_DECL
(DECL_INITIAL (decl) == 0) == DECL_EXTERNAL (decl).
Jakub
next prev parent reply other threads:[~2016-01-29 10:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 20:38 [C " Jakub Jelinek
2016-01-26 15:21 ` Richard Biener
2016-01-26 16:18 ` Jakub Jelinek
2016-01-27 10:17 ` Richard Biener
2016-01-27 18:52 ` Jakub Jelinek
2016-01-27 19:29 ` Jeff Law
2016-01-28 20:15 ` [C++ " Jakub Jelinek
2016-01-29 10:25 ` Jason Merrill
2016-01-29 10:35 ` Jakub Jelinek [this message]
2016-01-29 10:47 ` Jason Merrill
2016-01-29 12:31 ` Jakub Jelinek
2016-02-03 16:05 ` Jason Merrill
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=20160129103507.GM3017@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=jason@redhat.com \
--cc=joseph@codesourcery.com \
--cc=polacek@redhat.com \
--cc=richard.guenther@gmail.com \
/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: link
Be 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).