All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@inria.fr>, cocci@inria.fr
Cc: Elia Pinto <gitter.spiros@gmail.com>
Subject: Re: [cocci] Fixing the adjustment of variable declarations
Date: Sun, 13 Nov 2022 15:55:23 +0100	[thread overview]
Message-ID: <752a875f-6d92-669f-784d-73f96ed2a0c7@web.de> (raw)
In-Reply-To: <3fdf533a-e03d-25e-ba34-5591ed0d393@inria.fr>

[-- Attachment #1: Type: text/plain, Size: 935 bytes --]

>> How will development considerations evolve accordingly?
> If you use the option --debug, you get an explanation:
>
>      (ONCE) compress.c: 2: More than one variable in the declaration, and
> so it cannot be transformed.  Check that there is no transformation on the
> type or the ;.  …


Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> spatch --debug suggestion3_for_Elia_Pinto-20221111.cocci expand_ref-test.c
…
@@ -1,6 +1,6 @@
void my_expand_ref_variant(void)
{
- const char **p, *r;
- for (p = ref_rev_parse_rules; *p; ++p)
+ const char **r;
+ for (const char **p = ref_rev_parse_rules; *p; ++p)
 { /* loop content */ }
}
…


The error message was not displayed for such a source code variant.

I got the impression instead that multiple declarators could be handled
to some degree for changeable variable declarations also by the means of
the semantic patch language.

Regards,
Markus

[-- Attachment #2: Type: text/html, Size: 1881 bytes --]

  reply	other threads:[~2022-11-13 14:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 11:42 [cocci] Possible bug in a semantic patch Elia Pinto
2022-11-09 11:49 ` Julia Lawall
2022-11-09 20:21 ` [cocci] Fixing the adjustment of variable declarations Markus Elfring
2022-11-11 19:10   ` [cocci] Reducing the scope for variables with SmPL Markus Elfring
2022-11-12  9:42   ` [cocci] Fixing the adjustment of variable declarations Markus Elfring
2022-11-12 10:38     ` Markus Elfring
2022-11-12 11:17       ` Julia Lawall
2022-11-12 11:45         ` Markus Elfring
2022-11-13 10:30     ` Markus Elfring
2022-11-13 10:36       ` Julia Lawall
2022-11-13 12:26         ` Markus Elfring
2022-11-13 14:10           ` Julia Lawall
2022-11-13 14:23             ` Markus Elfring
2022-11-13 14:28               ` Julia Lawall
2022-11-13 14:55                 ` Markus Elfring [this message]
2022-11-13 15:19                   ` Julia Lawall
2022-11-13 15:36                     ` 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=752a875f-6d92-669f-784d-73f96ed2a0c7@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@inria.fr \
    --cc=gitter.spiros@gmail.com \
    --cc=julia.lawall@inria.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.