Debian Codegraph @

gcc/testsuite/gdc.dg/Waddress.d

raw
1 // { dg-do compile }
2 // { dg-options "-Waddress" }
3
4 void* ptr;
5
6 int test()
7 {
8 if (&ptr) // { dg-warning "the address of 'ptr' will always evaluate as 'true'" }
9 return 1;
10
11 return 0;
12 }