You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__device__voidf(); // redecl-note {{previous declaration is here}}
14
+
15
+
voidf() {} // redecl-warning {{target-attribute based function overloads are not supported by NVCC and will be treated as a function redeclaration:new declaration is __host__ function, old declaration is __device__ function}}
16
+
17
+
voidg(); // redecl-note {{previous declaration is here}}
18
+
19
+
__device__voidg() {} // redecl-warning {{target-attribute based function overloads are not supported by NVCC and will be treated as a function redeclaration:new declaration is __device__ function, old declaration is __host__ function}}
Clang can emit warnings when it detects that host (H) and device (D) functions are declared or defined with the same signature. These warnings are not enabled by default.
425
+
426
+
To enable these warnings, use the following compiler flag:
0 commit comments