public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tommy Vercetti <vercetti@zlew.org>
To: gcc@gcc.gnu.org
Subject: Re: c/c++ validator
Date: Sun, 19 Jun 2005 20:58:00 -0000	[thread overview]
Message-ID: <200506192258.00250@gj-laptop> (raw)
In-Reply-To: <m364wbhxiu.fsf@uniton.integrable-solutions.net>

On Sunday 19 June 2005 04:48, Gabriel Dos Reis wrote:
> Mathieu Malaterre <mmalater@nycap.rr.com> writes:
> | Gabriel Dos Reis wrote:
> | > Tommy Vercetti <vercetti@zlew.org> writes:
> | > | On Sunday 19 June 2005 03:03, you wrote:
> | > | > Elsa does not parse C++.
> | > |
> | > | Elsa is for C/C++, so it says on their website.
> | >
> | > I know what the website says.  My comment was about the actual *uses*
> | > of the parser.  Have you tried it on actual C++ programs?

They claim it does compile qt, and they work on making it compile KDE. That's 
enough for me. 
On free software "market" there is lack of good static checker/validator of 
c++ code. 
I was looking on different ones, for C, that claimed to have ability to find 
security problems. One that I found the best, is splint. But it's still not 
able to find such obvious problem:

char a[10];
for( unsigned int i; i< 100 ; i++ ) {
	a[i]=a[i]+1;
}

Even thou, it analyzes buffers, and other stuff. So...
Plus it can't do that for c++. 
It shouldn't be so hard, if they have code that gathers so much information 
already, and can find infinite loops, even not easy cases..

Elsa parses c++ code well enough for me, to at least try to write some code 
that will do something like that. Elsa thou has one potential problem, it's 
on bsd licence. Licence issues sux. 
You can't take some code from splint, and stick it into bsd code. I guess, but 
I maybe wrong. I don't even think that it will work from design point of 
view.

> | How about gccxml:
> |
> | http://www.gccxml.org
>
> It is a not C++ parser :-) -- if you're interested in function bodies
> and other more fundamental things, you lose.  It suffers from the same
> problems (at least ones we've found quite annoying) of using GCC
> currently:  too much of low-level stuff directly geared to code
> generation as understood by GCC now, and C++ programs are not
> represented at the most abstract level (contrast that with a
> celebrated C++ front-end on the market).  And it also shares problems
> with Elsa, no real support for templates (although the case of Elsa is
> slightly "worse" :-)).  Now, if you're just interested in simple
> "toplevel" decls, then that might be fine :-)

gccxml parser is a good idea maybe, but I don't think it's good for what I am 
looking for.

-- 
Vercetti

  reply	other threads:[~2005-06-19 20:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-18 22:24 Tommy Vercetti
2005-06-18 22:32 ` Mathieu Malaterre
2005-06-18 22:38   ` Tommy Vercetti
2005-06-19  1:03     ` Gabriel Dos Reis
2005-06-19  1:44       ` Tommy Vercetti
2005-06-19  2:05         ` Gabriel Dos Reis
2005-06-19  2:16           ` Mathieu Malaterre
2005-06-19  2:48             ` Gabriel Dos Reis
2005-06-19 20:58               ` Tommy Vercetti [this message]
2005-06-20 19:53                 ` Kai Henningsen
2005-06-20 20:58                   ` Tommy Vercetti
2005-06-19  3:04 ` Mark Loeser
2005-06-19  2:41 Florian Krohm
2005-06-19 23:59 David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200506192258.00250@gj-laptop \
    --to=vercetti@zlew.org \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).