Debian Codegraph @

gcc/testsuite/gcc.dg/c23-stddef-2.c

raw
1 /* Test __STDC_VERSION_STDDEF_H__ in C23. */
2 /* { dg-do preprocess } */
3 /* { dg-options "-std=c23 -pedantic-errors -Wsystem-headers" } */
4
5 #include <stddef.h>
6 /* Simulate what glibc <time.h> does without actually including it. */
7 #define __need_size_t
8 #define __need_NULL
9 #include <stddef.h>
10
11 #ifndef __STDC_VERSION_STDDEF_H__
12 #error "__STDC_VERSION_STDDEF_H__ not defined"
13 #endif
14
15 #if __STDC_VERSION_STDDEF_H__ != 202311L
16 #error "bad value of __STDC_VERSION_STDDEF_H__"
17 #endif