From: julia.lawall@lip6.fr (Julia Lawall)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Handling of omitted data type specification?
Date: Tue, 9 Apr 2013 07:19:07 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.02.1304090715590.2019@hadrien> (raw)
In-Reply-To: <51633345.6060103@users.sourceforge.net>
On Mon, 8 Apr 2013, SF Markus Elfring wrote:
> > In the previous fix that I made, I just caused the missing type,
> > which was hidden under a macro, to make the match fail.
>
> How do you think about to make this detail configurable?
On this case, there is nothing to configure. If there is no known type,
then matching a type variable cannot succeed.
> > In this case, though perhaps you would prefer T to be bound to int?
>
> Does the C programming language specify that integers are used as the default
> data type (or if modifiers are used)?
> http://stackoverflow.com/questions/2099830/unsigned-keyword-in-c#2099873
> https://www.cs50.net/resources/cppreference.com/data_types.html
> http://en.cppreference.com/w/cpp/language/types
Coccibelle already takes case of eg signed x; It should do the same for
register, for consistency.
> > That might cause some problemes, though, because it is not a real "int"
> > in the source code...
>
> Does the semantic patch language support to filter for omitted data types?
>
> Would you like to distinguish the use case if this item was just forgotten or
> intentionally omitted?
Perhaps it is useful. There may be an isomorphism for deciding whether or
not int is assumed in the signed etc case.
julia
prev parent reply other threads:[~2013-04-09 5:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1.1364983201.25969.cocci@systeme.lip6.fr>
2013-04-08 14:29 ` [Cocci] Analysis for Linux source files Nic Volanschi (R&D)
2013-04-08 14:54 ` Julia Lawall
2013-04-08 14:56 ` Julia Lawall
2013-04-08 15:05 ` Nic Volanschi (R&D)
2013-04-15 14:29 ` Julia Lawall
2013-04-08 21:14 ` [Cocci] Handling of omitted data type specification? SF Markus Elfring
2013-04-09 5:19 ` Julia Lawall [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=alpine.DEB.2.02.1304090715590.2019@hadrien \
--to=julia.lawall@lip6.fr \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox