This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C PATCH] Warn if inline attributes conflict (PR c/18079)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 20 Mar 2014 11:57:57 +0000
- Subject: Re: [C PATCH] Warn if inline attributes conflict (PR c/18079)
- Authentication-results: sourceware.org; auth=none
- References: <20140320110736 dot GL6523 at redhat dot com> <CAFiYyc2jRHS+B8veVeJOOZ6eTAbw=jap4oEtOJ0=Fq=ht54Epw at mail dot gmail dot com> <20140320114552 dot GM6523 at redhat dot com>
On Thu, 20 Mar 2014, Marek Polacek wrote:
> Dunno. I did what we do wrt conflicting cold/hot attributes. But
> here's a patch with what you suggest (with some Extra Quotes).
>
> 2014-03-20 Marek Polacek <polacek@redhat.com>
>
> PR c/18079
> c-family/
> * c-common.c (handle_noinline_attribute): Warn if the attribute
> conflicts with always_inline attribute.
> (handle_always_inline_attribute): Warn if the attribute conflicts
> with noinline attribute.
> testsuite/
> * gcc.dg/pr18079.c: New test.
This version is OK (for after 4.9 branches).
What happens if there are two declarations of the function, one with each
attribute? The testcase doesn't cover that.
--
Joseph S. Myers
joseph@codesourcery.com