cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [cocci] Improving support for argument lists with SmPL
@ 2024-03-25  9:01 Markus Elfring
  2024-03-25 10:18 ` Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Elfring @ 2024-03-25  9:01 UTC (permalink / raw)
  To: cocci

Hello,

I got the impression that there are opportunities to improve the support for
argument lists at some places.

Identifiers can occasionally be followed by parentheses in the source code.
Such a code combination can be interpreted in different ways.

* Function call

* Macro call

  See also:
  Improve support for handling arguments of function-like macros
  2024-03-14
  https://github.com/coccinelle/coccinelle/issues/362

  Compiler-specific extensions can be provided also as macros.
  The specification of attributes with arguments is a corresponding application area,
  isn't it?
  https://en.cppreference.com/w/c/language/attributes

  https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/0011af1760e37caada1f9d48e2c549bd519bf203/docs/manual/cocci_syntax.tex#L461
  https://github.com/coccinelle/coccinelle/blob/0011af1760e37caada1f9d48e2c549bd519bf203/docs/manual/cocci_syntax.tex#L461


Regards,
Markus

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [cocci] Improving support for argument lists with SmPL
  2024-03-25  9:01 [cocci] Improving support for argument lists with SmPL Markus Elfring
@ 2024-03-25 10:18 ` Julia Lawall
  2024-03-25 11:55   ` Markus Elfring
  0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2024-03-25 10:18 UTC (permalink / raw)
  To: Markus Elfring; +Cc: cocci



On Mon, 25 Mar 2024, Markus Elfring wrote:

> Hello,
>
> I got the impression that there are opportunities to improve the support for
> argument lists at some places.
>
> Identifiers can occasionally be followed by parentheses in the source code.
> Such a code combination can be interpreted in different ways.
>
> * Function call
>
> * Macro call
>
>   See also:
>   Improve support for handling arguments of function-like macros
>   2024-03-14
>   https://github.com/coccinelle/coccinelle/issues/362
>
>   Compiler-specific extensions can be provided also as macros.
>   The specification of attributes with arguments is a corresponding application area,
>   isn't it?
>   https://en.cppreference.com/w/c/language/attributes
>
>   https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/0011af1760e37caada1f9d48e2c549bd519bf203/docs/manual/cocci_syntax.tex#L461
>   https://github.com/coccinelle/coccinelle/blob/0011af1760e37caada1f9d48e2c549bd519bf203/docs/manual/cocci_syntax.tex#L461

If you have a specific question, please say what it is, and don't expect
that I wuill try to infer it from a collection of links.

julia

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [cocci] Improving support for argument lists with SmPL
  2024-03-25 10:18 ` Julia Lawall
@ 2024-03-25 11:55   ` Markus Elfring
  2024-03-25 12:04     ` Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Elfring @ 2024-03-25 11:55 UTC (permalink / raw)
  To: Julia Lawall, cocci

…
>> Identifiers can occasionally be followed by parentheses in the source code.
>> Such a code combination can be interpreted in different ways.
>>   Improve support for handling arguments of function-like macros
>>   2024-03-14
>>   https://github.com/coccinelle/coccinelle/issues/362
> If you have a specific question, please say what it is,

Please take another look at information in known issue trackers.

How many programming interfaces can be shared by the Coccinelle software for
data processing according to macro calls and handling of attributes with arguments?

See also another related clarification approach (from yesterday):
Fix a parse error for the addition of a special variable declaration
https://github.com/coccinelle/coccinelle/issues/363#issuecomment-2016794266


>                                                         and don't expect
> that I wuill try to infer it from a collection of links.

Would any more developers get into the mood to add ideas accordingly?

Regards,
Markus

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [cocci] Improving support for argument lists with SmPL
  2024-03-25 11:55   ` Markus Elfring
@ 2024-03-25 12:04     ` Julia Lawall
  2024-03-25 12:20       ` Markus Elfring
  0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2024-03-25 12:04 UTC (permalink / raw)
  To: Markus Elfring; +Cc: cocci

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



On Mon, 25 Mar 2024, Markus Elfring wrote:

> …
> >> Identifiers can occasionally be followed by parentheses in the source code.
> >> Such a code combination can be interpreted in different ways.
> …
> >>   Improve support for handling arguments of function-like macros
> >>   2024-03-14
> >>   https://github.com/coccinelle/coccinelle/issues/362
> …
> > If you have a specific question, please say what it is,
>
> Please take another look at information in known issue trackers.
>
> How many programming interfaces can be shared by the Coccinelle software for
> data processing according to macro calls and handling of attributes with arguments?

Coccinelle makes no distinction between macro calls and function calls.

But if this is again about your question about non-expressions in macro
arguments, nothing is going to happen.  The issue is rare and is not a
priority.

>
> See also another related clarification approach (from yesterday):
> Fix a parse error for the addition of a special variable declaration
> https://github.com/coccinelle/coccinelle/issues/363#issuecomment-2016794266

I don't see what that has to do with macro arguments.  Please don't mix
issues in a single message, especially when the message doesn't even make
clear what the issue is (giving a link dones't count as making it clear).

julia

>
>
> >                                                         and don't expect
> > that I wuill try to infer it from a collection of links.
>
> Would any more developers get into the mood to add ideas accordingly?
>
> Regards,
> Markus
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [cocci] Improving support for argument lists with SmPL
  2024-03-25 12:04     ` Julia Lawall
@ 2024-03-25 12:20       ` Markus Elfring
  0 siblings, 0 replies; 5+ messages in thread
From: Markus Elfring @ 2024-03-25 12:20 UTC (permalink / raw)
  To: Julia Lawall, cocci

>>>>   Improve support for handling arguments of function-like macros
>>>>   2024-03-14
>>>>   https://github.com/coccinelle/coccinelle/issues/362
>> How many programming interfaces can be shared by the Coccinelle software for
>> data processing according to macro calls and handling of attributes with arguments?
>
> Coccinelle makes no distinction between macro calls and function calls.

I got the impression that case distinctions should be enhanced here.


> But if this is again about your question about non-expressions in macro
> arguments, nothing is going to happen.  The issue is rare

I suggest to reconsider such a view.


> and is not a priority.

Further improvements would be nice for several issues.


>> See also another related clarification approach (from yesterday):
>> Fix a parse error for the addition of a special variable declaration
>> https://github.com/coccinelle/coccinelle/issues/363#issuecomment-2016794266
>
> I don't see what that has to do with macro arguments.

How would you like to handle argument lists for attributes?


>                                                        Please don't mix
> issues in a single message, especially when the message doesn't even make
> clear what the issue is (giving a link dones't count as making it clear).

Do you find a referenced message more interesting for further clarifications?


Markus_Elfring@Sonne:…/Projekte/Coccinelle/janitor> spatch --parse-cocci reduce_scope_for_smart_pointers_in_ice-9-20240324.cocci
…
warning: find: metavariable release not used in the - or context code
…


Regards,
Markus

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-25 12:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25  9:01 [cocci] Improving support for argument lists with SmPL Markus Elfring
2024-03-25 10:18 ` Julia Lawall
2024-03-25 11:55   ` Markus Elfring
2024-03-25 12:04     ` Julia Lawall
2024-03-25 12:20       ` Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).