public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christian Bruel <christian.bruel@st.com>
To: Richard Guenther <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,	Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATH] PR/49139 fix always_inline failures diagnostics
Date: Mon, 06 Jun 2011 08:58:00 -0000	[thread overview]
Message-ID: <4DEC9699.4010102@st.com> (raw)
In-Reply-To: <BANLkTimqr+1cQBFgkuSiCf1ugmsR7qBVGg@mail.gmail.com>



>> OK, the only difference is that we don't have the node analyzed here, so
>> externally_visible, etc are not set. With the initial proposal the warning
>> was emitted only if the function could not be inlined. Now it will be
>> emitted for each  DECL_COMDAT (decl)&&  !DECL_DECLARED_INLINE_P (decl)) even
>> if not preemptible, so conservatively we don't want to duplicate the
>> availability check.
>
> Hm, I'm confused.  Do all DECL_COMDAT functions have the
> always_inline attribute set?  I would have expected
>
> +      if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (decl)))
> +	{
> +	  if (!DECL_DECLARED_INLINE_P (decl))
> +	    warning (OPT_Wattributes,
> +		     "always_inline not declared inline might not be inlinable");
> +	}
>

I meant !DECL_COMDAT || !DECL_DECLARED_INLINE_P. but I was 
overprecautious. Didn't realize that member functions was already marked 
with DECLARED_INLINED_P even if not explicitly set. So OK one check is 
enough

> do you get excessive warnings with this?
>

No I don't. That's enough to catch the original issue

Cheers

Christian

  reply	other threads:[~2011-06-06  8:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-31  9:07 Christian Bruel
2011-05-31 12:25 ` Richard Guenther
2011-05-31 12:28   ` Jakub Jelinek
2011-05-31 17:07   ` Christian Bruel
2011-06-01 10:03     ` Richard Guenther
2011-06-01 13:02       ` Christian Bruel
2011-06-01 13:07         ` Richard Guenther
2011-06-06  8:58           ` Christian Bruel [this message]
2011-06-06  9:55             ` Richard Guenther
2011-06-08  8:25               ` Christian Bruel
2011-06-08  9:42                 ` Richard Guenther
2011-06-08 11:56                   ` Christian Bruel
2011-06-14 11:29                   ` Christian Bruel
2011-06-20 13:36                   ` Christian Bruel
2011-06-20 13:46                     ` Rainer Orth
2011-06-20 13:54                       ` Mike Stump
2011-06-20 14:04                       ` Christian Bruel
2011-06-21 11:52                         ` Richard Guenther
2011-06-21 12:07                           ` Richard Guenther
2011-06-20 13:51                     ` Richard Guenther
2011-06-01 14:49       ` Jan Hubicka

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=4DEC9699.4010102@st.com \
    --to=christian.bruel@st.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --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).