All of lore.kernel.org
 help / color / mirror / Atom feed
From: lars@metafoo.de (Lars-Peter Clausen)
To: cocci@systeme.lip6.fr
Subject: [Cocci] cocci: char* indexing style for linux
Date: Mon, 18 Aug 2014 12:34:11 +0200	[thread overview]
Message-ID: <53F1D6A3.7090107@metafoo.de> (raw)
In-Reply-To: <alpine.DEB.2.10.1408180446550.2548@hadrien>

On 08/18/2014 11:49 AM, Julia Lawall wrote:
> Actually, isn't the whoe structure field the wrong way to go about it
> here?  Don't we just want a pointer-typed expression, of whatever form it
> has?  That will unfortunately require lots of type information, but I
> don't see how to do it otherewise, because any kind of variable or
> structure field reference can also be an integer.  There isno reason why
> eg the structure field reference is the array.
>
> expression *e; matches a pointer.
>
> julia
>

The problem is that foo->bar + 10 is still a pointer expression of the same 
type as bar, so e will match the whole ting and not just foo->bar as intended.

- Lars

  parent reply	other threads:[~2014-08-18 10:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-16 20:06 [Cocci] cocci: char* indexing style for linux Joe Perches
2014-08-16 20:59 ` Joe Perches
2014-08-17 10:11   ` Julia Lawall
2014-08-17 13:01     ` Joe Perches
2014-08-17 16:09       ` SF Markus Elfring
2014-08-17 16:22         ` Joe Perches
2014-08-17 17:39           ` [Cocci] Conversion of some pointer arithmetic to array indexing style SF Markus Elfring
2014-08-17 17:48             ` Julia Lawall
2014-08-17 17:42           ` [Cocci] cocci: char* indexing style for linux Julia Lawall
2014-08-18  8:37             ` Lars-Peter Clausen
2014-08-18  9:40               ` Julia Lawall
2014-08-18 11:31                 ` SF Markus Elfring
2014-08-18 11:55                   ` Julia Lawall
2014-08-18  9:49               ` Julia Lawall
2014-08-18  9:57                 ` Lars-Peter Clausen
2014-08-18 10:33                   ` Julia Lawall
2014-08-18 10:55                     ` [Cocci] Clarification for array indexing style SF Markus Elfring
2014-08-18 10:59                       ` Julia Lawall
2014-08-18 10:34                 ` Lars-Peter Clausen [this message]
2014-08-18  2:56       ` [Cocci] cocci: char* indexing style for linux Julia Lawall
2014-08-18  8:08         ` [Cocci] Conversion of some pointer arithmetic to array indexing style SF Markus Elfring
2014-08-18  9:39           ` Julia Lawall
2014-08-18 10:35             ` SF Markus Elfring

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=53F1D6A3.7090107@metafoo.de \
    --to=lars@metafoo.de \
    --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.