Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / warn / constexpr-70194.C
blobcdc56c0c6f20e8ed3191551a6e3fab36ce2983d3
1 // PR c++/70194
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wall" }
5 int i;
7 const bool b0 = &i == 0; // { dg-warning "the address of .i. will never be NULL" }
8 constexpr int *p = &i;
9 const bool b1 = p == 0; // { dg-warning "the address of .i. will never be NULL" }
10 const bool b2 = 0 == p; // { dg-warning "the address of .i. will never be NULL" }
11 const bool b3 = p != 0; // { dg-warning "the address of .i. will never be NULL" }
12 const bool b4 = 0 != p; // { dg-warning "the address of .i. will never be NULL" }