瀏覽代碼

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>