Преглед изворни кода

gcc: Add possibly missing include.

* gcc-plugin/include/starpu-gcc/tasks.h: Add comment about <starpu.h>
  inclusion.

* gcc-plugin/src/warn-unregistered.c: Include <starpu.h>.
Ludovic Courtès пре 12 година
родитељ
комит
8883e7c789
2 измењених фајлова са 8 додато и 0 уклоњено
  1. 4 0
      gcc-plugin/include/starpu-gcc/tasks.h
  2. 4 0
      gcc-plugin/src/warn-unregistered.c

+ 4 - 0
gcc-plugin/include/starpu-gcc/tasks.h

@@ -20,6 +20,10 @@
 
 #include <starpu-gcc/config.h>
 
+/* Note: Users of this file must first include <starpu.h>, but we don't do
+   that here because it has to be done very early, to avoid the dreaded "use
+   of poisoned malloc" in xmmintrin.h.  */
+
 #include <starpu-gcc/utils.h>
 
 

+ 4 - 0
gcc-plugin/src/warn-unregistered.c

@@ -19,6 +19,10 @@
 
 #include <starpu-gcc/config.h>
 
+/* We must include starpu.h here, otherwise gcc will complain about a poisoned
+   malloc in xmmintrin.h.  */
+#include <starpu.h>
+
 #include <gcc-plugin.h>
 #include <plugin-version.h>