On Tuesday 11 of August 2009 11:40:45 Christopher Li wrote: > What is the significant of making every header file self compilable? > Unlike the kernel header files exported to user space, which usually > have self contained meaning. Most of these header file have tight > interaction with each other. I don't think it make sense for other sparse > application to just use one of the header file. > > Enforcing each header file to be self compilable will result in a lot > of unnecessary include. Gcc needs to include "symbol.h" many times > just to skip over it. Take a look at pre-process.c. It is not exactly > trivial. It needs to scan the token to find out the end of the if > scope. In this case, it might be better just let other header > file depend on "symbol.h". Then an ordinary SPARSE user needs to try various permutation of the includes to pass his hello-world through compiler. It could be really annoying. I'd like to have all includes in alphabetical order because it's then easier to maintenance. If you really want to have external dependencies of SPARSE headers (no matter what reason for), the dependencies should be exactly documented somewhere - maybe in the headers themselves? What about replacing my '#include "allocate.h"' with comment '// ATTENTION: you have to include allocate.h before storage.h'? > I want to heard what other people think about it too. I am a little bit > reluctant on this one. No problem with me as it has easy workaround. Kamil -- 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