c++: P0847R7 (deducing this) - xobj lambdas. [PR102609]
[official-gcc.git] / gcc / testsuite / g++.dg / spellcheck-stdint.C
blobaa9c7e643e252c8c4170e0c23addedcfd847cf32
1 /* { dg-options "-std=c++11" } */
2 /* Missing <cstdint>.  */
4 char c = INT8_MAX; // { dg-error "'INT8_MAX' was not declared" }
5 // { dg-message "'INT8_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
7 short s = INT16_MAX; // { dg-error "'INT16_MAX' was not declared" }
8 // { dg-message "'INT16_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
10 int i = INT32_MAX; // { dg-error "'INT32_MAX' was not declared" }
11 // { dg-message "'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
13 long l = INT64_MAX; // { dg-error "'INT64_MAX' was not declared" }
14 // { dg-message "'INT64_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
16 intptr_t test_intptr (void) // { dg-error "'intptr_t' does not name a type" }
17 // { dg-message "'intptr_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
19   return 0;
22 int test_intptr_max (void)
24   return (int) INTPTR_MAX; // { dg-error "'INTPTR_MAX' was not declared" }
25 // { dg-message "'INTPTR_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
28 uintptr_t test_uintptr (void) // { dg-error "'uintptr_t' does not name a type" }
29 // { dg-message "'uintptr_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
31   return 0;
34 unsigned int test_uintptr_max (void)
36   return (unsigned int) UINTPTR_MAX; // { dg-error "'UINTPTR_MAX' was not declared" }
37 // { dg-message "'UINTPTR_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
40 int8_t i8; // { dg-error "'int8_t' does not name a type" }
41 // { dg-message "'int8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
42 int16_t i16; // { dg-error "'int16_t' does not name a type" }
43 // { dg-message "'int16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
44 int32_t i32; // { dg-error "'int32_t' does not name a type" }
45 // { dg-message "'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
46 int64_t i64; // { dg-error "'int64_t' does not name a type" }
47 // { dg-message "'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
49 void test_uint_t (void)
51   char bu8[(unsigned int)UINT8_MAX]; // { dg-error "'UINT8_MAX' was not declared" }
52   // { dg-message "'UINT8_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
53   char bu16[(unsigned int)UINT16_MAX]; // { dg-error "'UINT16_MAX' was not declared" }
54   // { dg-message "'UINT16_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
55   char bu32[(unsigned int)UINT32_MAX]; // { dg-error "'UINT32_MAX' was not declared" }
56   // { dg-message "'UINT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
57   char bu64[(unsigned int)UINT64_MAX]; // { dg-error "'UINT64_MAX' was not declared" }
58   // { dg-message "'UINT64_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
60   auto ui8 = (uint8_t) 8; // { dg-error "'uint8_t' was not declared" }
61   // { dg-message "'uint8_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
62   auto ui16 = (uint16_t) 16; // { dg-error "'uint16_t' was not declared" }
63   // { dg-message "'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
64   auto ui32 = (uint32_t) 32; // { dg-error "'uint32_t' was not declared" }
65   // { dg-message "'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }
66   auto ui64 = (uint64_t) 64; // { dg-error "'uint64_t' was not declared" }
67   // { dg-message "'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'" "" { target *-*-* } .-1 }