Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/systemvariables_bool_union.d

raw
1 /*
2 REQUIRED_ARGS: -de
3 TEST_OUTPUT:
4 ---
5 fail_compilation/systemvariables_bool_union.d(21): Deprecation: accessing overlapped field `Box.b` with unsafe bit patterns will become `@system` in a future release
6 ---
7 */
8
9 // https://issues.dlang.org/show_bug.cgi?id=24477
10
11 bool schrodingersCat() @safe
12 {
13 union Box
14 {
15 bool b;
16 ubyte y;
17 }
18
19 Box u;
20 u.y = 2;
21 return u.b;
22 }