On Thu, Apr 30, 2020 at 09:10:17PM +0530, Jaskaran Singh wrote:
> On Tue, 2020-04-28 at 20:17 +0200, Paul Chaignon wrote:
> > Thanks for the quick answer!
> > 
> > On Tue, Apr 28, 2020 at 07:44:15PM +0200, Julia Lawall wrote:
> > > 
> > > On Tue, 28 Apr 2020, Paul Chaignon wrote:

[...]

> > Unfortunately, my semantic patch now leads to the following changes:
> > 
> >   - struct icmphdr icmphdr __align_stack_8;
> >   + struct icmphdr icmphdr __align_stack_8 __align_stack_8;
> > 
> 
> Hi Paul,
> 
> Just FYI if you want to avoid the double attribute problem there,
> disable the optional_attributes isomorphism for the rule where you add
> the __align_stack_8 attribute. Example:
> 
> @disable optional_attributes@
> attribute name __align_stack_8;
> @@
> 
>  int foo
> +     __align_stack_8
>       = 2;
> 
> With this, any attributes that you don't specify in your SmPL won't be
> matched in source code either.

That works great! Thanks a lot!

[...]

Paul
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to