Re: [C PATCH] Warn for optimize attribute on decl after definition (PR c/70255)

2016-05-10 Thread Marek Polacek
On Mon, May 09, 2016 at 09:52:41PM -0600, Martin Sebor wrote: > On 05/09/2016 08:45 AM, Marek Polacek wrote: > > In this PR, Richi pointed out that we don't warn for the case when a > > declaration with attribute optimize follows the definition which is lacking > > that attribute. This patch adds

Re: [C PATCH] Warn for optimize attribute on decl after definition (PR c/70255)

2016-05-09 Thread Martin Sebor
On 05/09/2016 08:45 AM, Marek Polacek wrote: In this PR, Richi pointed out that we don't warn for the case when a declaration with attribute optimize follows the definition which is lacking that attribute. This patch adds such a warning. Though the question is whether this shouldn't apply to mo

Re: [C PATCH] Warn for optimize attribute on decl after definition (PR c/70255)

2016-05-09 Thread Joseph Myers
On Mon, 9 May 2016, Marek Polacek wrote: > In this PR, Richi pointed out that we don't warn for the case when a > declaration with attribute optimize follows the definition which is lacking > that attribute. This patch adds such a warning. Though the question is > whether this shouldn't apply to

[C PATCH] Warn for optimize attribute on decl after definition (PR c/70255)

2016-05-09 Thread Marek Polacek
In this PR, Richi pointed out that we don't warn for the case when a declaration with attribute optimize follows the definition which is lacking that attribute. This patch adds such a warning. Though the question is whether this shouldn't apply to more attributes than just "optimize". And, as ca