1 /* Missing <stddef.h>. */
3 void *ptr
= NULL
; /* { dg-error "'NULL' undeclared here" } */
4 /* { dg-message "'NULL' is defined in header '<stddef.h>'; this is probably fixable by adding '#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>'; this is probably fixable by adding '#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>'; this is probably fixable by adding '#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>'; this is probably fixable by adding '#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>'; this is probably fixable by adding '#include <stdio.h>'" "" { target *-*-* } .-1 } */
22 char buf
[BUFSIZ
]; /* { dg-error "'BUFSIZ' undeclared" } */
23 /* { dg-message "'BUFSIZ' is defined in header '<stdio.h>'; this is probably fixable by adding '#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>'; this is probably fixable by adding '#include <stdio.h>'" "" { target *-*-* } .-1 } */
28 stderr
; /* { dg-error "'stderr' undeclared" } */
29 /* { dg-message "'stderr' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'" "" { target *-*-* } .-1 } */
31 stdin
; /* { dg-error "'stdin' undeclared" } */
32 /* { dg-message "'stdin' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'" "" { target *-*-* } .-1 } */
34 stdout
; /* { dg-error "'stdout' undeclared" } */
35 /* { dg-message "'stdout' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'" "" { target *-*-* } .-1 } */
37 EOF
; /* { dg-error "'EOF' undeclared" } */
38 /* { dg-message "'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'" "" { target *-*-* } .-1 } */
41 /* Missing <stdlib.h>. */
43 void test_stdlib (int i
)
45 i
= EXIT_SUCCESS
; /* { dg-error "'EXIT_SUCCESS' undeclared" } */
46 /* { dg-message "'EXIT_SUCCESS' is defined in header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'" "" { target *-*-* } .-1 } */
47 i
= EXIT_FAILURE
; /* { dg-error "'EXIT_FAILURE' undeclared" } */
48 /* { dg-message "'EXIT_FAILURE' is defined in header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'" "" { target *-*-* } .-1 } */
51 /* Missing <errno.h>. */
53 int test_errno_h (void)
55 return errno
; /* { dg-error "'errno' undeclared" } */
56 /* { dg-message "'errno' is defined in header '<errno.h>'; this is probably fixable by adding '#include <errno.h>'" "" { target *-*-* } .-1 } */
59 /* Missing <stdarg.h>. */
61 void test_stdarg_h (void)
63 va_list ap
; /* { dg-error "unknown type name 'va_list'" } */
64 /* { dg-message "'va_list' is defined in header '<stdarg.h>'; this is probably fixable by adding '#include <stdarg.h>'" "" { target *-*-* } .-1 } */
67 /* Missing <limits.h>. */
68 int test_INT_MAX (void)
70 return INT_MAX
; /* { dg-line INT_MAX_line } */
71 /* { dg-error "'INT_MAX' undeclared" "" { target *-*-* } INT_MAX_line } */
72 /* { dg-bogus "__INT_MAX__" "" { target *-*-* } INT_MAX_line } */
73 /* { dg-message "'INT_MAX' is defined in header '<limits.h>'; this is probably fixable by adding '#include <limits.h>'" "" { target *-*-* } INT_MAX_line } */
76 /* Missing <float.h>. */
77 float test_FLT_MAX
= FLT_MAX
; /* { dg-line FLT_MAX_line } */
78 /* { dg-error "'FLT_MAX' undeclared" "" { target *-*-* } FLT_MAX_line } */
79 /* { dg-message "'FLT_MAX' is defined in header '<float.h>'; this is probably fixable by adding '#include <float.h>'" "" { target *-*-* } FLT_MAX_line } */