* C++ support
@ 2007-04-30 18:36 Mitesh Shah
2007-05-01 17:50 ` Josh Triplett
0 siblings, 1 reply; 2+ messages in thread
From: Mitesh Shah @ 2007-04-30 18:36 UTC (permalink / raw)
To: Linux-Sparse (E-mail)
Hi,
Has any one have any idea about how to sparse C++ code? Is there any wrapper or converter to convert it to C before passing it to sparse?
Thanks,
-Mitesh
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: C++ support
2007-04-30 18:36 C++ support Mitesh Shah
@ 2007-05-01 17:50 ` Josh Triplett
0 siblings, 0 replies; 2+ messages in thread
From: Josh Triplett @ 2007-05-01 17:50 UTC (permalink / raw)
To: Mitesh Shah; +Cc: Linux-Sparse (E-mail)
[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]
Mitesh Shah wrote:
> Has any one have any idea about how to sparse C++ code? Is there any
> wrapper or converter to convert it to C before passing it to sparse?
Sparse doesn't support C++ natively. In theory, someone could write a C++
frontend that provides similar output to the C frontend (same data structures
and linearized bytecode format), but barring someone providing the *huge* pile
of code this would require *and* committing to support it, I don't see this
happening anytime soon. (That said, if someone genuinely has an interest in
doing so, feel free to contact linux-sparse@vger.kernel.org to coordinate.)
Some tools exist to translate C++ to C, most of them proprietary and most of
them quite old. Some of them come from the days when everyone used such tools
to compile C++ in the first place. To the best of my knowledge, all of these
tools primarily target the ability to compile with a C compiler; they don't
target easily readable C code. If you could manage to get the Sparse keywords
to pass through them into the C code, you *might* manage to get some useful
semantic warnings out of one of them, such as locking validation or
user/kernel pointer checking, though you'd have to wade through a lot of noise
to find them.
- Josh Triplett
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-01 17:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-30 18:36 C++ support Mitesh Shah
2007-05-01 17:50 ` Josh Triplett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).