RFR 9: 8074818: Resolve disabled warnings for libjava

Martin Buchholz martinrb at google.com
Fri May 22 17:47:54 UTC 2015


It's a good idea to order include statements by system dependencies, jdk
dependencies, implementation helpers, BUT order of include statements
should never ever matter.  If it does, then we have a bug that should be
fixed.  Every header file should be independently includable, and C files
should only Include What They Use.  It would be good for us to test some of
that, e.g. can you compile each .h file as its own translation unit?


+#include <fcntl.h>
+#include <limits.h>
+
 #include "jni.h"
 #include "jni_util.h"
 #include "jlong.h"
@@ -32,9 +35,6 @@

 #include "java_io_FileInputStream.h"

-#include <fcntl.h>
-#include <limits.h>
-



More information about the build-dev mailing list