Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/c-c++-common/nonnull-3.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* PR c++/79984 */ | |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-Wnonnull-compare" } */ | |
4 | |
5 enum { r = 1 }; | |
6 | |
7 __attribute__ ((nonnull (r))) int | |
8 f (int *p) | |
9 { | |
10 return p == 0; /* { dg-warning "nonnull argument 'p' compared to NULL" } */ | |
11 } |