Debian Codegraph @

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

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail6497.d(12): Error: taking the address of stack-allocated local variable `n` is not allowed in a `@safe` function
5 fail_compilation/fail6497.d(12): Error: taking the address of stack-allocated local variable `n` is not allowed in a `@safe` function
6 ---
7 */
8
9 void main() @safe
10 {
11 int n;
12 auto b = &(0 ? n : n);
13 }