1
- #include <stdint.h>
1
+ typedef signed char int8_t ; // COMPLIANT: exception, typedefs are permitted
2
+ typedef unsigned char uint8_t ; // COMPLIANT: exception, typedefs are permitted
2
3
3
- typedef signed char INT8 ; // COMPLIANT: exception, typedefs are permitted
4
- typedef unsigned char UINT8 ; // COMPLIANT: exception, typedefs are permitted
4
+ typedef signed short int16_t ; // COMPLIANT: exception, typedefs are permitted
5
+ typedef unsigned short uint16_t ; // COMPLIANT: exception, typedefs are permitted
5
6
6
- typedef short _INT16 ; // COMPLIANT: exception, typedefs are permitted
7
- typedef signed short INT16 ; // COMPLIANT: exception, typedefs are permitted
8
- typedef unsigned short UINT16 ; // COMPLIANT: exception, typedefs are permitted
7
+ typedef signed int int32_t ; // COMPLIANT: exception, typedefs are permitted
8
+ typedef unsigned int uint32_t ; // COMPLIANT: exception, typedefs are permitted
9
9
10
- typedef int _INT32 ; // COMPLIANT: exception, typedefs are permitted
11
- typedef signed int INT32 ; // COMPLIANT: exception, typedefs are permitted
12
- typedef unsigned int UINT32 ; // COMPLIANT: exception, typedefs are permitted
10
+ typedef signed long int64_t ; // COMPLIANT: exception, typedefs are permitted
11
+ typedef unsigned long uint64_t ; // COMPLIANT: exception, typedefs are permitted
13
12
14
- typedef long _INT64 ; // COMPLIANT: exception, typedefs are permitted
15
- typedef signed long INT64 ; // COMPLIANT: exception, typedefs are permitted
16
- typedef unsigned long UINT64 ; // COMPLIANT: exception, typedefs are permitted
17
-
18
- typedef long long _INT128 ; // COMPLIANT: exception, typedefs are permitted
19
- typedef signed long long INT128 ; // COMPLIANT: exception, typedefs are permitted
13
+ typedef signed long long
14
+ int128_t ; // COMPLIANT: exception, typedefs are permitted
20
15
typedef unsigned long long
21
- UINT128 ; // COMPLIANT: exception, typedefs are permitted
16
+ uint128_t ; // COMPLIANT: exception, typedefs are permitted
22
17
23
- typedef float FLOAT32 ; // COMPLIANT: exception, typedefs are permitted
24
- typedef double FLOAT64 ; // COMPLIANT: exception, typedefs are permitted
25
- typedef long double FLOAT128 ; // COMPLIANT: exception, typedefs are permitted
18
+ typedef float float32_t ; // COMPLIANT: exception, typedefs are permitted
19
+ typedef double float64_t ; // COMPLIANT: exception, typedefs are permitted
20
+ typedef long double float128_t ; // COMPLIANT: exception, typedefs are permitted
26
21
27
22
typedef int8_t
28
23
astronomical_number_t ; // COMPLIANT: aliasing a fixed-width numeric typedef
29
24
typedef uint8_t u_astronomical_number_t ; // COMPLIANT: aliasing a fixed-width
30
25
// numeric typedef
31
26
typedef int
32
- astronomical_number_t ; // NON_COMPLIANT: aliasing a basic numeric type
27
+ _astronomical_number_t ; // NON_COMPLIANT: aliasing a basic numeric type
33
28
34
29
int // COMPLIANT: exception, main's return type can be plain int
35
30
main (int argc , // COMPLIANT: exception, argc's type can be plain int
36
31
char * argv []) { // COMPLIANT: char is not a basic numeric type
37
32
38
33
char c1 = 1 ; // COMPLIANT: char is not a basic numeric type
39
- signed char c2 = 1 ; // NON_COMPLIANT: use typedef int8_t in stdint
40
- unsigned char c3 = 1 ; // NON_COMPLIANT: use typedef uint8_t in stdint
41
- INT8 c4 = 1 ; // COMPLIANT: typedef used instead
34
+ signed char c2 = 1 ; // NON_COMPLIANT: use typedef int8_t
35
+ unsigned char c3 = 1 ; // NON_COMPLIANT: use typedef uint8_t
36
+ int8_t c4 = 1 ; // COMPLIANT: typedef used instead
42
37
43
38
short s1 = 1 ; // NON_COMPLIANT: short is a basic numeric type
44
- signed short s2 = 1 ; // NON_COMPLIANT: use typedef int16_t in stdint
45
- unsigned short s3 = 1 ; // NON_COMPLIANT: use typedef uint16_t in stdint
46
- INT16 s4 = 1 ; // COMPLIANT: typedef used instead
39
+ signed short s2 = 1 ; // NON_COMPLIANT: use typedef int16_t
40
+ unsigned short s3 = 1 ; // NON_COMPLIANT: use typedef uint16_t
41
+ int16_t s4 = 1 ; // COMPLIANT: typedef used instead
47
42
48
43
int i1 = 1 ; // NON_COMPLIANT: int is a basic numeric type
49
- signed int i2 = 1 ; // NON_COMPLIANT: use typedef int32_t in stdint
50
- unsigned int i3 = 1 ; // NON_COMPLIANT: use typedef uint32_t in stdint
51
- INT32 s4 = 1 ; // COMPLIANT: typedef used instead
44
+ signed int i2 = 1 ; // NON_COMPLIANT: use typedef int32_t
45
+ unsigned int i3 = 1 ; // NON_COMPLIANT: use typedef uint32_t
46
+ int32_t i4 = 1 ; // COMPLIANT: typedef used instead
52
47
53
48
long l1 = 1 ; // NON_COMPLIANT: int is a basic numeric type
54
- signed long l2 = 1 ; // NON_COMPLIANT: use typedef int64_t in stdint
55
- unsigned long l3 = 1 ; // NON_COMPLIANT: use typedef uint64_t in stdint
56
- INT64 s4 = 1 ; // COMPLIANT: typedef used instead
49
+ signed long l2 = 1 ; // NON_COMPLIANT: use typedef int64_t
50
+ unsigned long l3 = 1 ; // NON_COMPLIANT: use typedef uint64_t
51
+ int64_t l4 = 1 ; // COMPLIANT: typedef used instead
57
52
58
- long long l1 = 1 ; // NON_COMPLIANT: int is a basic numeric type
59
- signed long long l2 = 1 ; // NON_COMPLIANT: use typedef int128_t in stdint
60
- unsigned long long l3 = 1 ; // NON_COMPLIANT: use typedef uint128_t in stdint
61
- INT128 s4 = 1 ; // COMPLIANT: typedef used instead
53
+ long long ll1 = 1 ; // NON_COMPLIANT: int is a basic numeric type
54
+ signed long long ll2 = 1 ; // NON_COMPLIANT: use typedef int128_t
55
+ unsigned long long ll3 = 1 ; // NON_COMPLIANT: use typedef uint128_t
56
+ int128_t ll4 = 1 ; // COMPLIANT: typedef used instead
62
57
63
- float f1 = 1 ; // NON_COMPLIANT: float is a basic numeric type, use a typedef
64
- FLOAT32 f2 = 1 ; // COMPLIANT: typedef used instead
58
+ float f1 = 1 ; // NON_COMPLIANT: float is a basic numeric type, use a typedef
59
+ float32_t f2 = 1 ; // COMPLIANT: typedef used instead
65
60
66
- double d1 = 1 ; // NON_COMPLIANT: int is a basic numeric type
67
- FLOAT64 d2 = 1 ; // COMPLIANT: typedef used instead
61
+ double d1 = 1 ; // NON_COMPLIANT: int is a basic numeric type
62
+ float64_t d2 = 1 ; // COMPLIANT: typedef used instead
68
63
69
64
long double ld1 = 1 ; // NON_COMPLIANT: int is a basic numeric type
70
- FLOAT128 ld2 = 1 ; // COMPLIANT: typedef used instead
65
+ float128_t ld2 = 1 ; // COMPLIANT: typedef used instead
71
66
}
0 commit comments