Commit d43aef3
authored
[SYCL] Fix static_assert with -funsigned-char (#17133)
The type of (ext_vector<int8_t, 2>{1, 0} == 0)[1] has type char, not
int8_t, and therefore depending on whether -funsigned-char is in effect
may either have the value -1 or have the value 255. Cast to int8_t to
ensure it always gets taken as signed. This is only needed for the
static_assert: the rest of the code already works for signed and
unsigned plain char alike.1 parent db30646 commit d43aef3
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
| 269 | + | |
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
| |||
0 commit comments