Skip to content

Commit e702e9b

Browse files
committed
Reword -sycl-std and -std descriptions
Changes: - documented that -sycl-std doesn't imply C++ standard - documented that -std=sycl/dpcpp implies some C++ standard - added clarification about incompatible versions of SYCL/DPC++ and C++
1 parent 8829abc commit e702e9b

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

sycl/doc/ControllingSYCLLanguageFeatures.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,26 @@ Possible values:
1919
specification, see [SYCL Registry] for more details and the specification
2020
text.
2121

22-
Note: setting `-sycl-std` option automatically implies a particular C++
23-
standard version to be set.
22+
- `dpcpp-0.8`: corresponds to DPC++ version documented in oneAPI 0.8
2423

25-
**TODO**: do we need to specify which exact version is implied by which
26-
`-sycl-std` value? AFAIK, SYCL spec only specifies minimum required C++
27-
version, which is C++11 and we set C++17 in our implementation
28-
29-
- `dpcpp-0.7`: corresponds to DPC++ 0.7.
30-
31-
Basically, `-sycl-std=dpcpp-0.7` implies support for SYCL 1.2.1 specification,
32-
bunch of extension enabled and `-std=c++17`
24+
Basically, `-sycl-std=dpcpp-0.8` implies support for SYCL 1.2.1 specification
25+
and bunch of extension enabled.
3326

3427
See [oneAPI Specification] for more details and the specification text.
3528

3629
[SYCL Registry]: https://www.khronos.org/registry/SYCL/
3730
[oneAPI Specification]: https://spec.oneapi.com/
3831

39-
Note: it is possible to change C++ version independently of SYCL/DPC++ standard
40-
version if that is needed: `-sycl-std=1.2.1 -std=c++14`, for example.
32+
Note: `-sycl-std` **doesn't** imply any C++ standard version to be set,
33+
which means that some default value will be selected. If by some reason, that
34+
default version is not a desired one, it is possible to change C++ version
35+
independently of SYCL/DPC++ standard version via specifying additional option:
36+
`-sycl-std=1.2.1 -std=c++14`, for example.
37+
38+
If SYCL/DPC++ standard version and C++ standard version (either default value
39+
for the compiler or one which was explicitly set via `-std`) are incompatible,
40+
then it is expected to see compilation errors. Incompatible means that C++
41+
standard version is less than minimum required by SYCL/DPC++ standard.
4142

4243
`-std=<value>`, `--std=<value>`, `--std <value>`
4344

@@ -47,7 +48,12 @@ option which allows to specify language standard to compile for.
4748
Supported values (besides listed in clang documentation/help):
4849

4950
- `sycl-1.2.1`, `sycl-2017`: corresponds to `-sycl-std=1.2.1`
50-
- `dpcpp-0.7`: corresponds to `-sycl-std=dpcpp-0.7`
51+
- `dpcpp-0.8`: corresponds to `-sycl-std=dpcpp-0.8`
52+
53+
Note: setting SYCL or DPC++ standard version via `-std` option automatically
54+
implies some C++ standard version to be set, according to requirements of
55+
corresponding SYCL/DPC++ specification. For example, for SYCL 1.2.1 it would be
56+
at least C++11, while for DPC++ 0.8 it would be C++17.
5157

5258
Please note that if you specify `-std` flag several times, only the latest
5359
value takes effect. This means, that if you want to specifiy particular C++

0 commit comments

Comments
 (0)