1 /* Missing <stddef.h>. */
3 void *ptr
= NULL
; /* { dg-error "'NULL' undeclared here" } */
4 /* { dg-message "'NULL' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?" "" { target *-*-* } .-1 } */
6 ptrdiff_t pd
; /* { dg-error "unknown type name 'ptrdiff_t'" } */
7 /* { dg-message "'ptrdiff_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?" "" { target *-*-* } .-1 } */
9 wchar_t wc
; /* { dg-error "unknown type name 'wchar_t'" } */
10 /* { dg-message "'wchar_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?" "" { target *-*-* } .-1 } */
12 size_t sz
; /* { dg-error "unknown type name 'size_t'" } */
13 /* { dg-message "'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?" "" { target *-*-* } .-1 } */
15 /* Missing <stdio.h>. */
17 void test_stdio_h (void)
19 FILE *f
; /* { dg-error "unknown type name 'FILE'" } */
20 /* { dg-message "'FILE' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
22 char buf
[BUFSIZ
]; /* { dg-error "'BUFSIZ' undeclared" } */
23 /* { dg-message "'BUFSIZ' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
25 char buf2
[FILENAME_MAX
]; /* { dg-error "'FILENAME_MAX' undeclared" } */
26 /* { dg-message "'FILENAME_MAX' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
28 stderr
; /* { dg-error "'stderr' undeclared" } */
29 /* { dg-message "'stderr' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
31 stdin
; /* { dg-error "'stdin' undeclared" } */
32 /* { dg-message "'stdin' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
34 stdout
; /* { dg-error "'stdout' undeclared" } */
35 /* { dg-message "'stdout' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
37 EOF
; /* { dg-error "'EOF' undeclared" } */
38 /* { dg-message "'EOF' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?" "" { target *-*-* } .-1 } */
41 /* Missing <errno.h>. */
43 int test_errno_h (void)
45 return errno
; /* { dg-error "'errno' undeclared" } */
46 /* { dg-message "'errno' is defined in header '<errno.h>'; did you forget to '#include <errno.h>'?" "" { target *-*-* } .-1 } */
49 /* Missing <stdarg.h>. */
51 void test_stdarg_h (void)
53 va_list ap
; /* { dg-error "unknown type name 'va_list'" } */
54 /* { dg-message "'va_list' is defined in header '<stdarg.h>'; did you forget to '#include <stdarg.h>'?" "" { target *-*-* } .-1 } */
57 /* Missing <limits.h>. */
58 int test_INT_MAX (void)
60 return INT_MAX
; /* { dg-line INT_MAX_line } */
61 /* { dg-error "'INT_MAX' undeclared" "" { target *-*-* } INT_MAX_line } */
62 /* { dg-bogus "__INT_MAX__" "" { target *-*-* } INT_MAX_line } */
63 /* { dg-message "'INT_MAX' is defined in header '<limits.h>'; did you forget to '#include <limits.h>'?" "" { target *-*-* } INT_MAX_line } */