From: David Given <dg@cowlark.com>
To: linux-sparse@vger.kernel.org
Subject: Re: `char * s = "abc";' causes compile to crash with a segfault
Date: Wed, 29 Apr 2009 23:43:15 +0100 [thread overview]
Message-ID: <49F8D803.6080000@cowlark.com> (raw)
In-Reply-To: <49F8C1EB.5010909@garzik.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jeff Garzik wrote:
[...]
>> Just out of curiosity, is sparse stable enough in general to be used
>> as a full-fledged front-end for a C compiler?
>
> As long as you don't do super-weird, non-standard C: sure.
Well --- I did find a whole bunch of bugs when working on Clue. OTOH
that was a while ago, so some of them might have been fixed by now. Look
back in the archives for 'Odd sparse behaviour' posted on 2008-07-06,
and 'Odd behaviour with OP_SCAST' posted on 2008-09-08.
In addition, I found a number of places where minor tweaks to what data
Sparse keeps around can make a compiler writer's life much easier; for
example, keeping more type data makes finding the type of a pseudo much
easier. There's a combined patch shipped with Clue that fixes and
enhances a bunch of this stuff:
http://cluecc.svn.sourceforge.net/viewvc/cluecc/clue/sparse.patch?revision=34&view=markup
(In fact, if you're generating llvm assembly directly, you may find it
easier just to add a backend to Clue rather than write your own, er,
middle-end --- a lot of the simplifications Clue does for languages like
Javascript also apply to llvm bitcode.)
<plug> Did I mention that Clue is now converting C into Java source that
runs at 40% of compiled C? </plug>
- --
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "People who think they know everything really annoy those of us who
│ know we don't." --- Bjarne Stroustrup
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJ+Nf6f9E0noFvlzgRAvpIAKCcJG0/SZ0mbx5Iel0iR2GbfJpclACgiQuw
/pkelbkI9I0FkdXqX/bTbQ0=
=581X
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-04-29 22:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-29 20:53 `char * s = "abc";' causes compile to crash with a segfault Alexander Sorockin
2009-04-29 21:08 ` Jeff Garzik
2009-04-29 22:43 ` David Given [this message]
2009-04-29 23:41 ` Christopher Li
2009-04-30 10:13 ` David Given
2009-04-30 8:55 ` Alexander Sorockin
2009-04-30 9:16 ` Christopher Li
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=49F8D803.6080000@cowlark.com \
--to=dg@cowlark.com \
--cc=linux-sparse@vger.kernel.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 NNTP newsgroup(s).