c: Implement C23 nullptr (N3042)
[official-gcc.git] / gcc / testsuite / gcc.dg / c2x-nullptr-4.c
blob7479ab4ea1ddc929fd1f680bf2749082273d552d
1 /* Test that -Wc11-c2x-compat issues a warning (not a pedwarn) about
2 `nullptr' in C2X. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=c2x -pedantic-errors -Wc11-c2x-compat" } */
6 int *
7 fn (int *p)
9 p = nullptr; /* { dg-warning "ISO C does not support .nullptr. before C2X" } */
10 return p;