[Issue 23700] compilable/test22842.c:64:24: error: expression in static assertion is not constant
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 12 15:35:16 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23700
--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Another failing test:
compilable/test23031.c:9:25: error: expression in static assertion is not
constant
9 | _Static_assert("\x1"[0] == 1, "5");
| ~~~~~~~~~^~~~
compilable/test23031.c:10:26: error: expression in static assertion is not
constant
10 | _Static_assert("\x20"[0] == 0x20, "6");
| ~~~~~~~~~~^~~~~~~
compilable/test23031.c:11:27: error: expression in static assertion is not
constant
11 | _Static_assert("\x020"[0] == 0x20, "7");
| ~~~~~~~~~~~^~~~~~~
compilable/test23031.c:12:28: error: expression in static assertion is not
constant
12 | _Static_assert("\x0020"[0] == 0x20, "8");
| ~~~~~~~~~~~~^~~~~~~
compilable/test23054.c:23:25: error: expression in static assertion is not
constant
23 | _Static_assert(test1(1) == 2, "1");
| ~~~~~~~~~^~~~
compilable/test23054.c:24:25: error: expression in static assertion is not
constant
24 | _Static_assert(test2(1) == 0, "2");
| ~~~~~~~~~^~~~
```
/* https://issues.dlang.org/show_bug.cgi?id=23031
*/
_Static_assert(sizeof("\x1") == 2, "1");
_Static_assert(sizeof("\x20") == 2, "2");
_Static_assert(sizeof("\x020") == 2, "3");
_Static_assert(sizeof("\x0020") == 2, "4");
_Static_assert("\x1"[0] == 1, "5");
_Static_assert("\x20"[0] == 0x20, "6");
_Static_assert("\x020"[0] == 0x20, "7");
_Static_assert("\x0020"[0] == 0x20, "8");
```
--
More information about the Digitalmars-d-bugs
mailing list