Discussion:
[Cocci] Support for C++ delete expressions?
Julia Lawall
2018-06-03 09:32:08 UTC
Permalink
Hello,
The information “make a small attempt to parse C++ files” is provided for
the parameter “--c++” of the program “spatch”.
How does the software development situation look like for the handling
of “delete expressions”?
Delete is handled. If there is some example for which the result is not
satisfactory, you would have to provide it.

julia
http://en.cppreference.com/w/cpp/language/delete
Regards,
Markus
_______________________________________________
Cocci mailing list
https://systeme.lip6.fr/mailman/listinfo/cocci
Julia Lawall
2018-06-11 10:49:54 UTC
Permalink
delete [] is now supported by the C++ parser (ie with option --c++). Note
that no C++ specific operators are supported by the semantic patch
language.

julia
Julia Lawall
2018-06-25 17:13:11 UTC
Permalink
Post by Julia Lawall
delete [] is now supported by the C++ parser (ie with option --c++).
This is nice.
Post by Julia Lawall
Note that no C++ specific operators are supported by the semantic
patch language.
How will the software situation evolve further for corresponding key words?
Would you ever like to support a source code transformation
where unnecessary null pointer checks can be removed before
such delete statements?
https://clang.llvm.org/extra/clang-tidy/checks/readability-delete-null-pointer.html
C++ is not a priority for me personally. If someone wants to fund adding
better support for C++, that would probably be good for Coccinelle.

julia
Regards,
Markus
Thierry Martinez
2018-07-04 16:00:40 UTC
Permalink
/usr/bin/ocamlc.opt -c commons/proc_pidpath_stubs.c
gcc: error: unrecognized command line option
‘-fstack-clash-protection’; did you mean ‘-fstack-protector’?
Thank you for reporting this. It seems that ocamlc assumes a version
of GCC more recent than the version installed on your system.

In commit c619caf8 (github master), I removed the C stubs and replaced
by pure OCaml implementations. The problem should have disappeared now.

Cheers,
--
Thierry.
Post by Julia Lawall
delete [] is now supported by the C++ parser (ie with option --c++).
Thanks for this software extension.
Now I am curious on collateral evolution around this information.

VERSION=1.0.6-00452-g175de16b

/usr/bin/ocamlc.opt -c commons/proc_pidpath_stubs.c
gcc: error: unrecognized command line option ‘-fstack-clash-protection’; did you mean ‘-fstack-protector’?
make: *** [Makefile:633: commons/proc_pidpath_stubs.o] Error 2
Are there any special dependencies to consider for the usage of
the software “OCaml 4.05.0-5.1” (on my openSUSE development system)?
Regards,
Markus
Loading...