aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c23-nullptr-4.c
blob: 578f9992e76de8a961b3583bbd8cec2cf89b60c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* Test that -Wc11-c23-compat issues a warning (not a pedwarn) about
   `nullptr' in C23.  */
/* { dg-do compile } */
/* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */

int *
fn (int *p)
{
  p = nullptr; /* { dg-warning "ISO C does not support .nullptr. before C23" } */
  return p;
}