This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: c/c++ validator
- From: Florian Krohm <britzel at acm dot org>
- To: gdr at integrable-solutions dot net
- Cc: vercetti at zlew dot org, gcc at gcc dot gnu dot org
- Date: Sat, 18 Jun 2005 22:42:17 -0400
- Subject: Re: c/c++ validator
> Tommy Vercetti <vercetti@zlew.org> writes:
>
> | Yeah, but for more than just STL, and opensource. C++ checker that
> | is going to work for instance for KDE.
> | Wonder why they use proprietary parser,
>
Gabriel Dos Reis wrote:
> Most of the tools I know of are either "research projects" (which
> means that they basically "die" when the professor get promoted or the
> students graduate; they are lots of them out there) or are/ use
> proprietary tools.
>
> We need to get GCC/g++ to a competing level of usefulness but the road
> is not quite that straight.
>
Yes, twice. Among the things that you need are:
- detailled source code correspondence for every TREE node,
- you want to know whether a TREE node represents something that was
compiler generated as opposed to written in the source (e.g. for
cast operations)
- you most likely want an unlowered representation of the C++ source
(and that will be the real hard part)
- you don't want the frontend to optimize anything, e.g no folding
(ideally you want both the folded and unfolded expression)
- you might want to know whether a certain TREE node was the result of
a macro expansion
I used a very old version of GCC (3.0.1) as the frontend for some
static checker. We succeeded in hacking in support for some of the
above but C++ was a royal pain because of lowering.
Florian