annotate gcc/testsuite/gcc.dg/spellcheck-stdint.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 /* { dg-options "-std=gnu99" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2 /* Missing <stdint.h>. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4 char c = INT8_MAX; // { dg-error "'INT8_MAX' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 // { dg-message "'INT8_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7 short s = INT16_MAX; // { dg-error "'INT16_MAX' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8 // { dg-message "'INT16_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10 int i = INT32_MAX; // { dg-error "'INT32_MAX' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11 // { dg-message "'INT32_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 long l = INT64_MAX; // { dg-error "'INT64_MAX' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14 // { dg-message "'INT64_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 intptr_t test_intptr (void) // { dg-error "unknown type name 'intptr_t'" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17 // { dg-message "'intptr_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
18 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
19 return INTPTR_MAX; // { dg-error "'INTPTR_MAX' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
20 // { dg-message "'INTPTR_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
21 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
22
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
23 uintptr_t test_uintptr (void) // { dg-error "unknown type name 'uintptr_t'" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
24 // { dg-message "'uintptr_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
25 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
26 return UINTPTR_MAX; // { dg-error "'UINTPTR_MAX' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
27 // { dg-message "'UINTPTR_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
28 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
29
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
30 int8_t i8; // { dg-error "unknown type name 'int8_t'" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
31 // { dg-message "'int8_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
32 int16_t i16; // { dg-error "unknown type name 'int16_t'" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
33 // { dg-message "'int16_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
34 int32_t i32; // { dg-error "unknown type name 'int32_t'" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
35 // { dg-message "'int32_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
36 int64_t i64; // { dg-error "unknown type name 'int64_t'" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
37 // { dg-message "'int64_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
38
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
39 void test_uint_t (void)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
40 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
41 char bu8[(unsigned int)UINT8_MAX]; // { dg-error "'UINT8_MAX' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
42 // { dg-message "'UINT8_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
43 char bu16[(unsigned int)UINT16_MAX]; // { dg-error "'UINT16_MAX' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
44 // { dg-message "'UINT16_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
45 char bu32[(unsigned int)UINT32_MAX]; // { dg-error "'UINT32_MAX' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
46 // { dg-message "'UINT32_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
47 char bu64[(unsigned int)UINT64_MAX]; // { dg-error "'UINT64_MAX' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
48 // { dg-message "'UINT64_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
49
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
50 char ui8 = (uint8_t) 8; // { dg-error "'uint8_t' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
51 // { dg-error "expected" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
52 // { dg-message "'uint8_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-2 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
53 short ui16 = (uint16_t) 16; // { dg-error "'uint16_t' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
54 // { dg-error "expected" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
55 // { dg-message "'uint16_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-2 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
56 int ui32 = (uint32_t) 32; // { dg-error "'uint32_t' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
57 // { dg-error "expected" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
58 // { dg-message "'uint32_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-2 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
59 long ui64 = (uint64_t) 64; // { dg-error "'uint64_t' undeclared" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
60 // { dg-error "expected" "" { target *-*-* } .-1 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
61 // { dg-message "'uint64_t' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?" "" { target *-*-* } .-2 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
62 }