From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] [PATCH] coccinelle: assign signed result to unsigned variable
Date: Fri, 25 Sep 2015 17:51:01 +0200 [thread overview]
Message-ID: <56056D65.7070205@users.sourceforge.net> (raw)
In-Reply-To: <56051D2B.5040802@samsung.com>
>>> + at rs@
>>> +position p;
>>> +typedef bool, u8, u16, u32, u64, s8, s16, s32, s64;
>>> +{char, short int, int, long, long long, s8, s16, s32, s64} vs;
>> Can it matter to specify also the type modifier "signed" in this SmPL approach?
>> http://coccinelle.lip6.fr/docs/main_grammar005.html#ctype_qualif
> According to my tests it does not matter.
> Btw I should replace short int, with short,
I have got an other view on such an implementation detail around
explicit SmPL specifications.
> to allow catch short intergers.
Do you assume that the Coccinelle software will handle more data type
variants for you automatically?
>>> +@@
>>> +
>>> +vu at p = vs
>>> +
>>> + at r@
>>> +position rs.p;
>>> +identifier v, f;
>>> +statement S1, S2;
>>> +expression e;
>>> +@@
>>> +
>>> +*v at p = f(...);
>> Do you try to check here if the value receiver is at the same source code
>> position from the SmPL rule "rs"?
> Yes.
I imagine that there is an open issue in this SmPL approach then.
How should a return value from a function call and a variable access
work at the same place?
> Is there better way to do it?
Do you need to distinguish source code positions a bit more with
corresponding SmPL variables?
Regards,
Markus
WARNING: multiple messages have this Message-ID (diff)
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: cocci@systeme.lip6.fr
Subject: Re: [PATCH] coccinelle: assign signed result to unsigned variable
Date: Fri, 25 Sep 2015 15:51:01 +0000 [thread overview]
Message-ID: <56056D65.7070205@users.sourceforge.net> (raw)
In-Reply-To: <56051D2B.5040802@samsung.com>
>>> +@rs@
>>> +position p;
>>> +typedef bool, u8, u16, u32, u64, s8, s16, s32, s64;
>>> +{char, short int, int, long, long long, s8, s16, s32, s64} vs;
>> Can it matter to specify also the type modifier "signed" in this SmPL approach?
>> http://coccinelle.lip6.fr/docs/main_grammar005.html#ctype_qualif
> According to my tests it does not matter.
> Btw I should replace short int, with short,
I have got an other view on such an implementation detail around
explicit SmPL specifications.
> to allow catch short intergers.
Do you assume that the Coccinelle software will handle more data type
variants for you automatically?
>>> +@@
>>> +
>>> +vu@p = vs
>>> +
>>> +@r@
>>> +position rs.p;
>>> +identifier v, f;
>>> +statement S1, S2;
>>> +expression e;
>>> +@@
>>> +
>>> +*v@p = f(...);
>> Do you try to check here if the value receiver is at the same source code
>> position from the SmPL rule "rs"?
> Yes.
I imagine that there is an open issue in this SmPL approach then.
How should a return value from a function call and a variable access
work at the same place?
> Is there better way to do it?
Do you need to distinguish source code positions a bit more with
corresponding SmPL variables?
Regards,
Markus
WARNING: multiple messages have this Message-ID (diff)
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Gilles Muller <Gilles.Muller@lip6.fr>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Michal Marek <mmarek@suse.com>,
Nicolas Palix <nicolas.palix@imag.fr>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
cocci@systeme.lip6.fr
Subject: Re: [PATCH] coccinelle: assign signed result to unsigned variable
Date: Fri, 25 Sep 2015 17:51:01 +0200 [thread overview]
Message-ID: <56056D65.7070205@users.sourceforge.net> (raw)
In-Reply-To: <56051D2B.5040802@samsung.com>
>>> +@rs@
>>> +position p;
>>> +typedef bool, u8, u16, u32, u64, s8, s16, s32, s64;
>>> +{char, short int, int, long, long long, s8, s16, s32, s64} vs;
>> Can it matter to specify also the type modifier "signed" in this SmPL approach?
>> http://coccinelle.lip6.fr/docs/main_grammar005.html#ctype_qualif
> According to my tests it does not matter.
> Btw I should replace short int, with short,
I have got an other view on such an implementation detail around
explicit SmPL specifications.
> to allow catch short intergers.
Do you assume that the Coccinelle software will handle more data type
variants for you automatically?
>>> +@@
>>> +
>>> +vu@p = vs
>>> +
>>> +@r@
>>> +position rs.p;
>>> +identifier v, f;
>>> +statement S1, S2;
>>> +expression e;
>>> +@@
>>> +
>>> +*v@p = f(...);
>> Do you try to check here if the value receiver is at the same source code
>> position from the SmPL rule "rs"?
> Yes.
I imagine that there is an open issue in this SmPL approach then.
How should a return value from a function call and a variable access
work at the same place?
> Is there better way to do it?
Do you need to distinguish source code positions a bit more with
corresponding SmPL variables?
Regards,
Markus
next prev parent reply other threads:[~2015-09-25 15:51 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-24 12:54 [Cocci] [PATCH] coccinelle: assign signed result to unsigned variable Andrzej Hajda
2015-09-24 12:54 ` Andrzej Hajda
2015-09-24 15:51 ` [Cocci] " SF Markus Elfring
2015-09-24 15:51 ` SF Markus Elfring
2015-09-24 15:51 ` SF Markus Elfring
2015-09-25 10:08 ` [Cocci] " Andrzej Hajda
2015-09-25 10:08 ` Andrzej Hajda
2015-09-25 10:08 ` Andrzej Hajda
2015-09-25 15:51 ` SF Markus Elfring [this message]
2015-09-25 15:51 ` SF Markus Elfring
2015-09-25 15:51 ` SF Markus Elfring
2015-09-26 7:45 ` [Cocci] " SF Markus Elfring
2015-09-26 7:45 ` SF Markus Elfring
2015-09-26 7:45 ` SF Markus Elfring
2015-09-26 9:07 ` [Cocci] " Julia Lawall
2015-09-26 9:07 ` Julia Lawall
2015-09-26 9:07 ` Julia Lawall
2015-09-26 9:41 ` [Cocci] " SF Markus Elfring
2015-09-26 9:41 ` SF Markus Elfring
2015-09-26 9:41 ` SF Markus Elfring
2015-09-26 9:45 ` [Cocci] " Julia Lawall
2015-09-26 9:45 ` Julia Lawall
2015-09-26 9:45 ` Julia Lawall
2015-09-26 9:52 ` [Cocci] " SF Markus Elfring
2015-09-26 9:52 ` SF Markus Elfring
2015-09-26 9:52 ` SF Markus Elfring
2015-09-26 9:55 ` [Cocci] " Julia Lawall
2015-09-26 9:55 ` Julia Lawall
2015-09-26 9:55 ` Julia Lawall
2015-09-26 11:43 ` [Cocci] " SF Markus Elfring
2015-09-26 11:43 ` SF Markus Elfring
2015-09-26 11:43 ` SF Markus Elfring
2015-09-26 13:55 ` [Cocci] " Julia Lawall
2015-09-26 13:55 ` Julia Lawall
2015-09-26 13:55 ` Julia Lawall
2015-09-26 15:22 ` [Cocci] " SF Markus Elfring
2015-09-26 15:22 ` SF Markus Elfring
2015-09-26 15:22 ` SF Markus Elfring
2015-09-26 15:30 ` [Cocci] " Julia Lawall
2015-09-26 15:30 ` Julia Lawall
2015-09-26 15:30 ` Julia Lawall
2015-09-26 15:50 ` [Cocci] " SF Markus Elfring
2015-09-26 15:50 ` SF Markus Elfring
2015-09-26 15:50 ` SF Markus Elfring
2015-09-26 15:55 ` [Cocci] " Julia Lawall
2015-09-26 15:55 ` Julia Lawall
2015-09-26 15:55 ` Julia Lawall
2015-09-26 16:01 ` [Cocci] " SF Markus Elfring
2015-09-26 16:01 ` SF Markus Elfring
2015-09-26 16:01 ` SF Markus Elfring
2015-09-28 10:54 ` [Cocci] [PATCH v2] " Andrzej Hajda
2015-09-28 10:54 ` Andrzej Hajda
2015-09-28 10:54 ` Andrzej Hajda
2015-09-28 11:32 ` [Cocci] " Julia Lawall
2015-09-28 11:32 ` Julia Lawall
2015-09-28 11:32 ` Julia Lawall
2015-09-28 11:59 ` [Cocci] " Andrzej Hajda
2015-09-28 11:59 ` Andrzej Hajda
2015-09-28 11:59 ` Andrzej Hajda
2015-09-30 21:51 ` [Cocci] " Julia Lawall
2015-09-30 21:51 ` Julia Lawall
2015-09-30 21:51 ` Julia Lawall
2015-09-28 12:07 ` [Cocci] " SF Markus Elfring
2015-09-28 12:07 ` SF Markus Elfring
2015-09-28 12:07 ` SF Markus Elfring
2015-09-28 12:12 ` [Cocci] " Andrzej Hajda
2015-09-28 12:12 ` Andrzej Hajda
2015-09-28 12:12 ` Andrzej Hajda
2015-09-28 12:20 ` [Cocci] " SF Markus Elfring
2015-09-28 12:20 ` SF Markus Elfring
2015-09-28 12:20 ` SF Markus Elfring
2015-09-28 12:42 ` [Cocci] " Julia Lawall
2015-09-28 12:42 ` Julia Lawall
2015-09-28 12:42 ` Julia Lawall
2015-09-28 12:55 ` SF Markus Elfring
2015-09-28 12:55 ` SF Markus Elfring
2015-09-28 12:55 ` SF Markus Elfring
2015-09-28 13:13 ` Julia Lawall
2015-09-28 13:13 ` Julia Lawall
2015-09-28 13:13 ` Julia Lawall
2015-09-28 13:53 ` SF Markus Elfring
2015-09-28 13:53 ` SF Markus Elfring
2015-09-28 13:53 ` SF Markus Elfring
2015-09-28 15:07 ` Julia Lawall
2015-09-28 15:07 ` Julia Lawall
2015-09-28 15:07 ` Julia Lawall
2015-10-03 7:09 ` Julia Lawall
2015-10-03 7:09 ` Julia Lawall
2015-10-03 7:09 ` Julia Lawall
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=56056D65.7070205@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=cocci@systeme.lip6.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.