Hi, Thanks for reviewing. On Tue, Jun 26, 2012 at 3:52 AM, Christopher Li <sparse@xxxxxxxxxxx> wrote: > On Mon, Jun 18, 2012 at 5:40 AM, <kosaki.motohiro@xxxxxxxxx> wrote: >> From: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxx> >> >> Currently, "-include" behavior is far different between sparse >> and gcc. gcc can compile following testcase. but sparse can't. >> >> This patch fixes it. >> > > Thanks for the patch. The patch has some small problem though: > There are some other user of the cmdline_include array. > Remove it will disable those options. If I understand correctly, cmdline_include is only used from -include and -imacro. and, -imacro is also needed to respect -I. Am I missing something? I'm now seeing git://git.kernel.org/pub/scm/devel/sparse/sparse.git. > Also the include order of the header file is now reversed: > > $ gcc -include a.h -include b.h foo.c > will include a.h then b.h. > Your patch will include b.h then a.h. Sorry, I can't reproduce this. a.h ---------------- #ifdef FOO #error a.h #endif #define FOO 'a' b.h ---------------- #ifdef FOO #error b.h #endif #define FOO 'b' main.c ------------- int main(void) { printf("foo = %d\n", FOO); return 0; } result --------------------- b.h:2:2: error: b.h > Granted, the "isystem" has the same bug here too. > > Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html