On Sun, 28 Mar 2021, Markus Elfring wrote:

> >> https://github.com/coccinelle/coccinelle/issues/139
> >
> > I looked at the link, but there is no concrete example of something that
> > does not work, so I have no idea what the problem is.
> You expressed another bit of better understanding of known limitations for
> the Coccinelle software already, didn't you?
> Would you like to help any more with attempts to achieve support for
> a transformation pattern like “#define ⇒ enum” according to the semantic 
> patch language?
> https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/981
> https://github.com/issues?q=is%3Aissue+author%3Aelfring+%22+enum%22

If you find that something does not work satisfactorily, propose a
semantic patch and show what doesn't work.  I'm not going to try to solve
a problem when I don't know what the problem is.

I think that this tranformation would be diffficult to make using
Coccinelle, due to the need to ensure that the enum values are end up in the
right order, if you want to rely on the implicit values of enums.
Furthermore, if this is targeting C code, the benefits will be limited,
because C considers enums to be the same as ints.

Cocci mailing list

Reply via email to