This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C PATCH] Warn if inline attributes conflict (PR c/18079)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]