All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Cocci] Function-like macro with the same name as a typedef
@ 2020-04-06  8:20 Markus Elfring
  2020-04-20 13:54 ` Markus Armbruster
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Elfring @ 2020-04-06  8:20 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: cocci

> * spatch seems to have trouble parsing
>
>     ARMSSE *s = ARMSSE(opaque);
>
>   where ARMSSE is a typedef, and ARMSSE() is a function-like macro.
>   Yes, I know that's in rather poor taste.

I am curious for the safe handling of related software development challenges.


> * Workaround #1: rename the typedef to ARMSSE_

Will adjustments become more interesting also around such name space issues?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

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

* Re: [Cocci] Function-like macro with the same name as a typedef
  2020-04-06  8:20 [Cocci] Function-like macro with the same name as a typedef Markus Elfring
@ 2020-04-20 13:54 ` Markus Armbruster
  2020-04-20 14:08   ` Markus Elfring
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Armbruster @ 2020-04-20 13:54 UTC (permalink / raw)
  To: Markus Elfring; +Cc: cocci

Markus Elfring <Markus.Elfring@web.de> writes:

>> * spatch seems to have trouble parsing
>>
>>     ARMSSE *s = ARMSSE(opaque);
>>
>>   where ARMSSE is a typedef, and ARMSSE() is a function-like macro.
>>   Yes, I know that's in rather poor taste.
>
> I am curious for the safe handling of related software development challenges.
>
>
>> * Workaround #1: rename the typedef to ARMSSE_
>
> Will adjustments become more interesting also around such name space issues?

I'm not sure I understand your question.  Can you elaborate?

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

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

* Re: [Cocci] Function-like macro with the same name as a typedef
  2020-04-20 13:54 ` Markus Armbruster
@ 2020-04-20 14:08   ` Markus Elfring
  2020-04-20 14:29     ` Markus Armbruster
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Elfring @ 2020-04-20 14:08 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: cocci

>>> * spatch seems to have trouble parsing
>>>
>>>     ARMSSE *s = ARMSSE(opaque);
>>>
>>>   where ARMSSE is a typedef, and ARMSSE() is a function-like macro.
>>>   Yes, I know that's in rather poor taste.
>>
>> I am curious for the safe handling of related software development challenges.
>>
>>
>>> * Workaround #1: rename the typedef to ARMSSE_
>>
>> Will adjustments become more interesting also around such name space issues?
>
> I'm not sure I understand your question.  Can you elaborate?

Do we come along the need to adjust (or even improve) two software areas?

* How many software implementations use identical type definitions
  and function-like macros?

* How will the evolution be continued around Coccinelle?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

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

* Re: [Cocci] Function-like macro with the same name as a typedef
  2020-04-20 14:08   ` Markus Elfring
@ 2020-04-20 14:29     ` Markus Armbruster
  2020-04-20 14:47       ` Markus Elfring
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Armbruster @ 2020-04-20 14:29 UTC (permalink / raw)
  To: Markus Elfring; +Cc: cocci

Markus Elfring <Markus.Elfring@web.de> writes:

>>>> * spatch seems to have trouble parsing
>>>>
>>>>     ARMSSE *s = ARMSSE(opaque);
>>>>
>>>>   where ARMSSE is a typedef, and ARMSSE() is a function-like macro.
>>>>   Yes, I know that's in rather poor taste.
>>>
>>> I am curious for the safe handling of related software development challenges.
>>>
>>>
>>>> * Workaround #1: rename the typedef to ARMSSE_
>>>
>>> Will adjustments become more interesting also around such name space issues?
>>
>> I'm not sure I understand your question.  Can you elaborate?
>
> Do we come along the need to adjust (or even improve) two software areas?
>
> * How many software implementations use identical type definitions
>   and function-like macros?

I don't know.  For what it's worth, it's valid C.  Unless I'm mistaken,
Coccinelle tries to support as much of C as it possibly can.

The QEMU project can certainly work around this Coccinelle bug /
restriction.

I'm reporting it because I've found Coccinelle useful.

> * How will the evolution be continued around Coccinelle?

Is this a question about Coccinelle's future?

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

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

* Re: [Cocci] Function-like macro with the same name as a typedef
  2020-04-20 14:29     ` Markus Armbruster
@ 2020-04-20 14:47       ` Markus Elfring
  2020-04-20 15:55         ` Markus Armbruster
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Elfring @ 2020-04-20 14:47 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: cocci

>> * How many software implementations use identical type definitions
>>   and function-like macros?
>
> I don't know.

Can it become interesting to find more about such usage patterns out?


> For what it's worth, it's valid C.  Unless I'm mistaken,
> Coccinelle tries to support as much of C as it possibly can.

How do you think about limitations for corresponding software
development resources?


> The QEMU project can certainly work around this Coccinelle
> bug / restriction.

Which adjustments will be chosen?


>> * How will the evolution be continued around Coccinelle?
>
> Is this a question about Coccinelle's future?

Yes, of course.

Are we trying to influence further development anyhow?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

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

* Re: [Cocci] Function-like macro with the same name as a typedef
  2020-04-20 14:47       ` Markus Elfring
@ 2020-04-20 15:55         ` Markus Armbruster
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Armbruster @ 2020-04-20 15:55 UTC (permalink / raw)
  To: Markus Elfring; +Cc: cocci

Markus Elfring <Markus.Elfring@web.de> writes:

>>> * How many software implementations use identical type definitions
>>>   and function-like macros?
>>
>> I don't know.
>
> Can it become interesting to find more about such usage patterns out?

Rule of thumb: for every user reporting an issue, there are several more
suffering quietly.  How many more?  I don't know.

A better estimate of how widespread such use is might be useful, but I
can't provide one.

>> For what it's worth, it's valid C.  Unless I'm mistaken,
>> Coccinelle tries to support as much of C as it possibly can.
>
> How do you think about limitations for corresponding software
> development resources?
>
>
>> The QEMU project can certainly work around this Coccinelle
>> bug / restriction.
>
> Which adjustments will be chosen?

Rename either the typedef or the macro.  More complicated than it
sounds, because both conform to naming conventions.

>>> * How will the evolution be continued around Coccinelle?
>>
>> Is this a question about Coccinelle's future?
>
> Yes, of course.
>
> Are we trying to influence further development anyhow?

I'm trying to help the Coccinelle project by reporting an issue, no
more, no less :)

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

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

end of thread, other threads:[~2020-04-20 15:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06  8:20 [Cocci] Function-like macro with the same name as a typedef Markus Elfring
2020-04-20 13:54 ` Markus Armbruster
2020-04-20 14:08   ` Markus Elfring
2020-04-20 14:29     ` Markus Armbruster
2020-04-20 14:47       ` Markus Elfring
2020-04-20 15:55         ` Markus Armbruster

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.