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

Joseph S. Myers joseph@codesourcery.com
Thu Mar 20 12:25:00 GMT 2014


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



More information about the Gcc-patches mailing list