From: Paul Chaignon <paul@cilium.io>
To: Jaskaran Singh <jaskaransingh7654321@gmail.com>
Cc: cocci@systeme.lip6.fr, paul.chaignon@gmail.com
Subject: Re: [Cocci] Using a macro for variable attributes
Date: Fri, 1 May 2020 15:45:27 +0200 [thread overview]
Message-ID: <20200501134526.GA6030@Mem> (raw)
In-Reply-To: <1153360396de8df1736cf050819099a71e7a1f90.camel@gmail.com>
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
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
prev parent reply other threads:[~2020-05-01 13:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 10:11 [Cocci] Using a macro for variable attributes Paul Chaignon
2020-04-28 17:44 ` Julia Lawall
2020-04-28 18:17 ` Paul Chaignon
2020-04-28 18:41 ` Julia Lawall
2020-04-28 18:58 ` Paul Chaignon
2020-04-30 15:40 ` Jaskaran Singh
2020-05-01 13:45 ` Paul Chaignon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200501134526.GA6030@Mem \
--to=paul@cilium.io \
--cc=cocci@systeme.lip6.fr \
--cc=jaskaransingh7654321@gmail.com \
--cc=paul.chaignon@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).