mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC] Improved handling of member access operators with SmPL expression variables
@ 2026-08-30  8:15 Markus Elfring
       [not found] ` <a7ce1c69-a6d9-e535-2bff-d16627ecfdee@inria.fr>
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Elfring @ 2026-08-30  8:15 UTC (permalink / raw)
  To: cocci, kernel-janitors; +Cc: LKML

Hello,

I pointed out that some data processing can be achieved by the means of
the semantic patch language.

SmPL script example:
@display2@
identifier an_item, a_field;
@@
(
*an_item.a_field
|
*an_item->a_field
)


Extend support for data processing with member identifications
2020-09-28
https://github.com/coccinelle/coccinelle/issues/226#issuecomment-699787269


Another SmPL script example:
@my_test@
expression hint;
@@
*hint->hint


Questionable test result (also according to the software combination “Coccinelle 1.3.2”):
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> spatch --parse-cocci show_expression_for_same_member_name.cocci
…
minus: parse error: 
  File "show_expression_for_same_member_name.cocci", line 4, column 7, charpos = 37
  around = 'hint',
  whole content = *hint->hint


How will development interests evolve to improve affected software components?
https://en.cppreference.com/c/language/operator_member_access#Member_access

Regards,
Markus

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

* Re: [RFC] Improved handling of member access operators with SmPL expression variables
       [not found] ` <a7ce1c69-a6d9-e535-2bff-d16627ecfdee@inria.fr>
@ 2026-08-30  8:45   ` Markus Elfring
  2026-08-30 10:10   ` Markus Elfring
  1 sibling, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2026-08-30  8:45 UTC (permalink / raw)
  To: Julia Lawall, cocci; +Cc: kernel-janitors, LKML

>> Another SmPL script example:
>> @my_test@
>> expression hint;
>> @@
>> *hint->hint
>>
>>
>> Questionable test result (also according to the software combination “Coccinelle 1.3.2”):
>> Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> spatch --parse-cocci show_expression_for_same_member_name.cocci
>> …
>> minus: parse error:
>>   File "show_expression_for_same_member_name.cocci", line 4, column 7, charpos = 37
>>   around = 'hint',
>>   whole content = *hint->hint
>>
>>
>> How will development interests evolve to improve affected software components?
>> https://en.cppreference.com/c/language/operator_member_access#Member_access
> 
> They will not improve.  Proposed changes will be NACKed.  Please stop
> asking for this.  It is not in the spirit of the language.
I hope that I can convince contributors for further development possibilities.

Regards,
Markus


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

* Re: [RFC] Improved handling of member access operators with SmPL expression variables
       [not found] ` <a7ce1c69-a6d9-e535-2bff-d16627ecfdee@inria.fr>
  2026-08-30  8:45   ` Markus Elfring
@ 2026-08-30 10:10   ` Markus Elfring
  1 sibling, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2026-08-30 10:10 UTC (permalink / raw)
  To: Julia Lawall, cocci; +Cc: kernel-janitors, LKML

>> Another SmPL script example:
>> @my_test@
>> expression hint;
>> @@
>> *hint->hint
>>
>>
>> Questionable test result (also according to the software combination “Coccinelle 1.3.2”):
>> Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> spatch --parse-cocci show_expression_for_same_member_name.cocci
>> …
>> minus: parse error:
>>   File "show_expression_for_same_member_name.cocci", line 4, column 7, charpos = 37
>>   around = 'hint',
>>   whole content = *hint->hint
> They will not improve.  …
>                   It is not in the spirit of the language.
* Under which circumstances would you get into the mood to explain the reasons for
  the presented error message?

* Can collateral evolution become more interesting?

* How many member names can be handled by bigger SmPL rules?


Regards,
Markus

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

end of thread, other threads:[~2026-08-30 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-30  8:15 [RFC] Improved handling of member access operators with SmPL expression variables Markus Elfring
     [not found] ` <a7ce1c69-a6d9-e535-2bff-d16627ecfdee@inria.fr>
2026-08-30  8:45   ` Markus Elfring
2026-08-30 10:10   ` Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®