Coccinelle Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] Transformations for implementations of functions without explicit return type
@ 2014-09-28  5:30 SF Markus Elfring
  2014-09-28  9:54 ` Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: SF Markus Elfring @ 2014-09-28  5:30 UTC (permalink / raw)
  To: cocci

Hello,

Does the current software "Coccinelle" support to transform implementations of
functions where a return type was not explicitly specified for it in a source file?
https://en.wikipedia.org/wiki/C99#Design

Regards,
Markus

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

* [Cocci] Transformations for implementations of functions without explicit return type
  2014-09-28  5:30 [Cocci] Transformations for implementations of functions without explicit return type SF Markus Elfring
@ 2014-09-28  9:54 ` Julia Lawall
  2014-09-28 13:44   ` SF Markus Elfring
  0 siblings, 1 reply; 5+ messages in thread
From: Julia Lawall @ 2014-09-28  9:54 UTC (permalink / raw)
  To: cocci

On Sun, 28 Sep 2014, SF Markus Elfring wrote:

> Hello,
>
> Does the current software "Coccinelle" support to transform implementations of
> functions where a return type was not explicitly specified for it in a source file?
> https://en.wikipedia.org/wiki/C99#Design

I think so, but perhaps not in the released version.

julia

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

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

* [Cocci] Transformations for implementations of functions without explicit return type
  2014-09-28  9:54 ` Julia Lawall
@ 2014-09-28 13:44   ` SF Markus Elfring
       [not found]     ` <alpine.DEB.2.10.1409281603340.2394@hadrien>
  0 siblings, 1 reply; 5+ messages in thread
From: SF Markus Elfring @ 2014-09-28 13:44 UTC (permalink / raw)
  To: cocci


>> Does the current software "Coccinelle" support to transform implementations of
>> functions where a return type was not explicitly specified for it in a source file?
> I think so, but perhaps not in the released version.

Would you like to try out if a function like "my_free" could be adjusted
after the reuse of your recent (unpublished) updates?
https://github.com/gvelez17/glimpse/blob/9557d48221aeaa64a43477c82ff6c66c94324081/index/io.c#L662

Regards,
Markus

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

* [Cocci] Transformations for implementations of functions without explicit return type
       [not found]     ` <alpine.DEB.2.10.1409281603340.2394@hadrien>
@ 2014-09-28 14:28       ` SF Markus Elfring
       [not found]         ` <alpine.DEB.2.10.1409281700330.2394@hadrien>
  0 siblings, 1 reply; 5+ messages in thread
From: SF Markus Elfring @ 2014-09-28 14:28 UTC (permalink / raw)
  To: cocci

> The lack of a return type is not supported for K&R functions.

That is a pity.

Now it seems that a function like "my_free" could only be adjusted after
a patch will be applied from my bug report.
https://github.com/gvelez17/glimpse/issues/6

How do you think about the possibility to transform more such
implementation details from a Kernighan/Ritchie coding style to a
current C standard approach?

Regards,
Markus

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

* [Cocci] Conversion of coding style "K&R" to newer C standard approaches?
       [not found]         ` <alpine.DEB.2.10.1409281700330.2394@hadrien>
@ 2014-09-28 15:53           ` SF Markus Elfring
  0 siblings, 0 replies; 5+ messages in thread
From: SF Markus Elfring @ 2014-09-28 15:53 UTC (permalink / raw)
  To: cocci

>>
>> How do you think about the possibility to transform more such
>> implementation details from a Kernighan/Ritchie coding style to a
>> current C standard approach?
> We don't really support K&R C.

A manual software update is generally also possible. It would be nice if
more dedicated tools can help in a corresponding automatic conversion,
wouldn't it?
http://astyle.sourceforge.net/

Regards,
Markus

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

end of thread, other threads:[~2014-09-28 15:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-28  5:30 [Cocci] Transformations for implementations of functions without explicit return type SF Markus Elfring
2014-09-28  9:54 ` Julia Lawall
2014-09-28 13:44   ` SF Markus Elfring
     [not found]     ` <alpine.DEB.2.10.1409281603340.2394@hadrien>
2014-09-28 14:28       ` SF Markus Elfring
     [not found]         ` <alpine.DEB.2.10.1409281700330.2394@hadrien>
2014-09-28 15:53           ` [Cocci] Conversion of coding style "K&R" to newer C standard approaches? SF Markus Elfring

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