Hi everyone!

Decided to give hacking on clang a try, as I'm very much interested in
compilers and languages and so forth.  I started out by trying to
compile a small C program of mine that exercises a good chunk of the
language.

Various GNU/Linux headers include the stddef.h header, which is
in /usr/include/linux, which isn't in the system header search path.
So, as a "hello everyone" gift, here's my first patch for the project.
Clearly it's the most awesome patch ever, what with it being a whole
single line in a part of a file marked as "need's to be replaced."  :)

Next up is to figure out why both time_t and size_t result in a variety
of comical errors such as:

///usr/include/linux/time.h:10:2: error: type name requires a specifier
or qualifier
        time_t  tv_sec;         /* seconds */
        ^

Out of the pages and pages of errors, almost all of them are either
errors from time_t or size_t, so I figure fixing whatever that is will
get me pretty close to compiling this little program.

I'm also rather tempted to go fix whatever is causing that extra // at
the start of the file path in the errors.  :)

- Sean
Index: Driver/clang.cpp
===================================================================
--- Driver/clang.cpp	(revision 44696)
+++ Driver/clang.cpp	(working copy)
@@ -741,6 +741,8 @@
     }
     
     AddPath("/usr/local/include", System, false, false, false, FM);
+    // linux/gnu
+    AddPath("/usr/include/linux", System, false, false, false, FM);
     // leopard
     AddPath("/usr/lib/gcc/i686-apple-darwin9/4.0.1/include", System, 
             false, false, false, FM);
_______________________________________________
cfe-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

Reply via email to