Coccinelle archive on lore.kernel.org
 help / color / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
Cc: Markus Elfring <Markus.Elfring@web.de>, cocci@systeme.lip6.fr
Subject: Re: [Cocci] How to replace obsolete #ifdef's?
Date: Fri, 7 Jun 2019 14:30:33 +0200 (CEST)
Message-ID: <alpine.DEB.2.20.1906071427420.3692@hadrien> (raw)
In-Reply-To: <a2d09fdf-456d-e6ae-1dae-b24b9f683d57@metux.net>



On Fri, 7 Jun 2019, Enrico Weigelt, metux IT consult wrote:

> On 06.06.19 12:34, Julia Lawall wrote:
> >
> >
> > On Thu, 6 Jun 2019, Markus Elfring wrote:
> >
> >>> #ifdefs are comments.
> >>
> >> I wonder about this wording.
> >
> > Ifdefs are parsed as comments.
>
> Any chance that it gets extended to understand at least such rather
> simple cases ?

Maybe it's possible.  A complexity is that structure field initializers
are considered to be unordered.  Ie if you put

- .a = e1,
- .b = e2,

it will also match a structure declaration in which there is

.b = 3,
.a = 4,

But it would have to detect that the ifdefs and endif are attached to
something specific.

Getting the newlines to work when removing and adding back the
initializers is more likely to work in the short term.

julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply index

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05 16:25 [Cocci] how to replace obsolete #ifdef's Enrico Weigelt, metux IT consult
2019-06-05 19:51 ` [Cocci] How to replace obsolete #ifdef's? Markus Elfring
2019-06-05 20:52 ` [Cocci] how to replace obsolete #ifdef's Julia Lawall
2019-06-05 21:42   ` Enrico Weigelt, metux IT consult
2019-06-06  5:46     ` Julia Lawall
2019-06-06  9:30       ` [Cocci] How to replace obsolete #ifdef's? Markus Elfring
2019-06-06 10:34         ` Julia Lawall
2019-06-06 14:20           ` Markus Elfring
2019-06-06 15:34             ` David Young
2019-06-07 12:01           ` Enrico Weigelt, metux IT consult
2019-06-07 12:30             ` Julia Lawall [this message]
2019-06-06  9:15     ` Markus Elfring
2019-06-06  9:39       ` Julia Lawall
2019-06-07 12:05         ` Enrico Weigelt, metux IT consult
2019-06-07 12:32           ` Julia Lawall
2019-06-07 13:40             ` Markus Elfring
2019-06-07 16:33               ` Julia Lawall
2019-06-07 17:26                 ` Markus Elfring
2019-06-07 17:36                 ` Markus Elfring
2019-06-07 18:48 ` Markus Elfring
2019-06-07 18:59   ` Julia Lawall
2019-06-08  7:49   ` [Cocci] Handling of designated initialisers by SmPL? Markus Elfring

Reply instructions:

You may reply publically 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.20.1906071427420.3692@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    --cc=lkml@metux.net \
    /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

Coccinelle archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/cocci/0 cocci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 cocci cocci/ https://lore.kernel.org/cocci \
		cocci@systeme.lip6.fr cocci@archiver.kernel.org
	public-inbox-index cocci


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/fr.lip6.systeme.cocci


AGPL code for this site: git clone https://public-inbox.org/ public-inbox