Debian Codegraph @

gcc/testsuite/gcc.dg/c23-nullptr-4.c

raw
1 /* Test that -Wc11-c23-compat issues a warning (not a pedwarn) about
2 `nullptr' in C23. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */
5
6 int *
7 fn (int *p)
8 {
9 p = nullptr; /* { dg-warning "ISO C does not support .nullptr. before C23" } */
10 return p;
11 }