1f08c3bdfSopenharmony_ci	FAQ - Why sparse?
2f08c3bdfSopenharmony_ci
3f08c3bdfSopenharmony_ciQ.  Why not just use gcc?
4f08c3bdfSopenharmony_ci
5f08c3bdfSopenharmony_ciA.  Gcc is big, complex, and the gcc maintainers are not interested in
6f08c3bdfSopenharmony_ci    other uses of the gcc front-end.  In fact, gcc has explicitly
7f08c3bdfSopenharmony_ci    resisted splitting up the front and back ends and having some common
8f08c3bdfSopenharmony_ci    intermediate language because of religious license issues - you can
9f08c3bdfSopenharmony_ci    have multiple front ends and back ends, but they all have to be part
10f08c3bdfSopenharmony_ci    of gcc and licensed under the GPL. 
11f08c3bdfSopenharmony_ci
12f08c3bdfSopenharmony_ci    This all (in my opinion) makes gcc development harder than it should
13f08c3bdfSopenharmony_ci    be, and makes the end result very ungainly.  With "sparse", the
14f08c3bdfSopenharmony_ci    front-end is very explicitly separated into its own independent
15f08c3bdfSopenharmony_ci    project, and is totally independent from the users.  I don't want to
16f08c3bdfSopenharmony_ci    know what you do in the back-end, because I don't think I _should_
17f08c3bdfSopenharmony_ci    know or care. 
18f08c3bdfSopenharmony_ci
19f08c3bdfSopenharmony_ci
20f08c3bdfSopenharmony_ciQ.  Why not GPL?
21f08c3bdfSopenharmony_ci
22f08c3bdfSopenharmony_ciA.  See the previous question: I personally think that the front end
23f08c3bdfSopenharmony_ci    must be a totally separate project from the back end: any other
24f08c3bdfSopenharmony_ci    approach just leads to insanity.  However, at the same time clearly
25f08c3bdfSopenharmony_ci    we cannot write intermediate files etc crud (since then the back end
26f08c3bdfSopenharmony_ci    would have to re-parse the whole thing and would have to have its
27f08c3bdfSopenharmony_ci    own front end and just do a lot of things that do not make any sense
28f08c3bdfSopenharmony_ci    from a technical standpoint).
29f08c3bdfSopenharmony_ci
30f08c3bdfSopenharmony_ci    I like the GPL, but as rms says, "Linus is just an engineer". I
31f08c3bdfSopenharmony_ci    refuse to use a license if that license causes bad engineering
32f08c3bdfSopenharmony_ci    decisions.  I want the front-end to be considered a separate
33f08c3bdfSopenharmony_ci    project, yet the GPL considers the required linking to make the
34f08c3bdfSopenharmony_ci    combined thing a derived work. Which is against the whole point
35f08c3bdfSopenharmony_ci    of 'sparse'.
36f08c3bdfSopenharmony_ci
37f08c3bdfSopenharmony_ci    I'm not interested in code generation. I'm not interested in what
38f08c3bdfSopenharmony_ci    other people do with their back-ends.  I _am_ interested in making a
39f08c3bdfSopenharmony_ci    good front-end, and "good" means that people find it usable. And
40f08c3bdfSopenharmony_ci    they shouldn't be scared away by politics or licenses. If they want
41f08c3bdfSopenharmony_ci    to make their back-end be BSD/MIT licensed, that's great. And if
42f08c3bdfSopenharmony_ci    they want to have a proprietary back-end, that's ok by me too. It's
43f08c3bdfSopenharmony_ci    their loss, not mine.
44f08c3bdfSopenharmony_ci
45f08c3bdfSopenharmony_ci
46f08c3bdfSopenharmony_ciQ.  Does it really parse C?
47f08c3bdfSopenharmony_ci
48f08c3bdfSopenharmony_ciA.  Yeah, well...  It parses a fairly complete subset of "extended C" as
49f08c3bdfSopenharmony_ci    defined by gcc.  HOWEVER, since I don't believe in K&R syntax for
50f08c3bdfSopenharmony_ci    function declarations or in giving automatic integer types, it
51f08c3bdfSopenharmony_ci    doesn't do that.  If you don't give types to your variables, they
52f08c3bdfSopenharmony_ci    won't have any types, and you can't use them.
53f08c3bdfSopenharmony_ci
54f08c3bdfSopenharmony_ci    Similarly, it will be very unhappy about undeclared functions,
55f08c3bdfSopenharmony_ci    rather than just assuming they have type "int". 
56f08c3bdfSopenharmony_ci
57f08c3bdfSopenharmony_ci    Note that a large rationale for me doing this project is for type
58f08c3bdfSopenharmony_ci    following, which to some degree explains why the thing is type-anal
59f08c3bdfSopenharmony_ci    and refuses to touch the old-style pre-ANSI non-typed (or weakly
60f08c3bdfSopenharmony_ci    typed) constructs. Maybe somebody else who is working on projects
61f08c3bdfSopenharmony_ci    where pre-ANSI C makes sense might be more inclined to care about
62f08c3bdfSopenharmony_ci    ancient C.  It's open source, after all. Go wild.
63f08c3bdfSopenharmony_ci
64f08c3bdfSopenharmony_ci
65f08c3bdfSopenharmony_ciQ.  What other sparse resources are available?
66f08c3bdfSopenharmony_ci
67f08c3bdfSopenharmony_ciA.  Wiki: http://sparse.wiki.kernel.org/index.php/Main_Page
68f08c3bdfSopenharmony_ci
69f08c3bdfSopenharmony_ci    Mailing list: linux-sparse@vger.kernel.org
70f08c3bdfSopenharmony_ci    See http://vger.kernel.org/vger-lists.html#linux-sparse for subscription
71f08c3bdfSopenharmony_ci    instructions and links to archives
72f08c3bdfSopenharmony_ci
73f08c3bdfSopenharmony_ci    Git repo: git://git.kernel.org/pub/scm/devel/sparse/sparse.git
74f08c3bdfSopenharmony_ci    gitweb: http://git.kernel.org/?p=devel/sparse/sparse.git
75