Skip to content

Commit ed9a029

Browse files
committed
Small clarification to SYCL_EXTERNAL
State that `SYCL_EXTERNAL` can only be applied to functions with external linkage, which clarifies that it does not "override" the C++ linkage.
1 parent 902cd82 commit ed9a029

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

adoc/chapters/device_compiler.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,9 @@ When a function is declared with [code]#SYCL_EXTERNAL#, that function must also
853853
be defined in some translation unit, where the function is declared with
854854
[code]#SYCL_EXTERNAL#.
855855

856+
A function may only be declared with [code]#SYCL_EXTERNAL# if it has external
857+
linkage by normal C++ rules.
858+
856859
A function declared with [code]#SYCL_EXTERNAL# may be called from both host and
857860
device code. The macro has no effect when the function is called from host
858861
code.

0 commit comments

Comments
 (0)