From 70368d76c4d9d75311f5bcfcbf101aad96bf11c8 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Tue, 14 Mar 2023 11:22:41 +0100 Subject: [PATCH] [machdeps] fix handling of fast integer types --- share/libc/inttypes.h | 177 +++++++++--------- share/machdeps/machdep-schema.yaml | 48 +++++ share/machdeps/machdep_avr_16.yaml | 8 + share/machdeps/machdep_gcc_x86_16.yaml | 8 + share/machdeps/machdep_gcc_x86_32.yaml | 8 + share/machdeps/machdep_gcc_x86_64.yaml | 8 + share/machdeps/machdep_msvc_x86_64.yaml | 8 + share/machdeps/machdep_ppc_32.yaml | 8 + share/machdeps/machdep_x86_16.yaml | 8 + share/machdeps/machdep_x86_32.yaml | 8 + share/machdeps/machdep_x86_64.yaml | 8 + share/machdeps/make_machdep/int_fast16_t.c | 31 +++ share/machdeps/make_machdep/int_fast32_t.c | 31 +++ share/machdeps/make_machdep/int_fast64_t.c | 31 +++ share/machdeps/make_machdep/int_fast8_t.c | 31 +++ share/machdeps/make_machdep/make_machdep.py | 8 + share/machdeps/make_machdep/uint_fast16_t.c | 31 +++ share/machdeps/make_machdep/uint_fast32_t.c | 31 +++ share/machdeps/make_machdep/uint_fast64_t.c | 31 +++ share/machdeps/make_machdep/uint_fast8_t.c | 31 +++ src/kernel_internals/runtime/machdep.ml | 21 ++- src/kernel_services/ast_data/cil_types.ml | 8 + .../ast_queries/cil_datatype.ml | 8 + src/kernel_services/ast_queries/file.ml | 8 + tests/libc/oracle/inttypes_h.2.res.oracle | 96 +++++----- tests/libc/oracle/inttypes_h.5.res.oracle | 96 +++++----- tests/misc/custom_machdep.ml | 8 + tests/misc/custom_machdep.yaml | 8 + tests/syntax/machdep_char_unsigned.ml | 8 + 29 files changed, 627 insertions(+), 187 deletions(-) create mode 100644 share/machdeps/make_machdep/int_fast16_t.c create mode 100644 share/machdeps/make_machdep/int_fast32_t.c create mode 100644 share/machdeps/make_machdep/int_fast64_t.c create mode 100644 share/machdeps/make_machdep/int_fast8_t.c create mode 100644 share/machdeps/make_machdep/uint_fast16_t.c create mode 100644 share/machdeps/make_machdep/uint_fast32_t.c create mode 100644 share/machdeps/make_machdep/uint_fast64_t.c create mode 100644 share/machdeps/make_machdep/uint_fast8_t.c diff --git a/share/libc/inttypes.h b/share/libc/inttypes.h index 1d685c0780b..1c64e01cff5 100644 --- a/share/libc/inttypes.h +++ b/share/libc/inttypes.h @@ -39,15 +39,15 @@ __PUSH_FC_STDLIB # define PRId32 __PRI32_PREFIX "d" # define PRId64 __PRI64_PREFIX "d" -# define PRIdLEAST8 __PRI8_PREFIX "d" -# define PRIdLEAST16 __PRI16_PREFIX "d" -# define PRIdLEAST32 __PRI32_PREFIX "d" -# define PRIdLEAST64 __PRI64_PREFIX "d" +# define PRIdLEAST8 __PRI_LEAST8_PREFIX "d" +# define PRIdLEAST16 __PRI_LEAST16_PREFIX "d" +# define PRIdLEAST32 __PRI_LEAST32_PREFIX "d" +# define PRIdLEAST64 __PRI_LEAST64_PREFIX "d" -# define PRIdFAST8 __PRI8_PREFIX "d" -# define PRIdFAST16 __PRIFAST16_PREFIX "d" -# define PRIdFAST32 __PRI32_PREFIX "d" -# define PRIdFAST64 __PRI64_PREFIX "d" +# define PRIdFAST8 __PRI_FAST8_PREFIX "d" +# define PRIdFAST16 __PRI_FAST16_PREFIX "d" +# define PRIdFAST32 __PRI_FAST32_PREFIX "d" +# define PRIdFAST64 __PRI_FAST64_PREFIX "d" # define PRIi8 __PRI8_PREFIX "i" @@ -55,15 +55,15 @@ __PUSH_FC_STDLIB # define PRIi32 __PRI32_PREFIX "i" # define PRIi64 __PRI64_PREFIX "i" -# define PRIiLEAST8 __PRI8_PREFIX "i" -# define PRIiLEAST16 __PRI16_PREFIX "i" -# define PRIiLEAST32 __PRI32_PREFIX "i" -# define PRIiLEAST64 __PRI64_PREFIX "i" +# define PRIiLEAST8 __PRI_LEAST8_PREFIX "i" +# define PRIiLEAST16 __PRI_LEAST16_PREFIX "i" +# define PRIiLEAST32 __PRI_LEAST32_PREFIX "i" +# define PRIiLEAST64 __PRI_LEAST64_PREFIX "i" -# define PRIiFAST8 __PRI8_PREFIX "i" -# define PRIiFAST16 __PRIFAST16_PREFIX "i" -# define PRIiFAST32 __PRI32_PREFIX "i" -# define PRIiFAST64 __PRI64_PREFIX "i" +# define PRIiFAST8 __PRI_FAST8_PREFIX "i" +# define PRIiFAST16 __PRI_FAST16_PREFIX "i" +# define PRIiFAST32 __PRI_FAST32_PREFIX "i" +# define PRIiFAST64 __PRI_FAST64_PREFIX "i" /* Octal notation. */ # define PRIo8 __PRI8_PREFIX "o" @@ -71,15 +71,15 @@ __PUSH_FC_STDLIB # define PRIo32 __PRI32_PREFIX "o" # define PRIo64 __PRI64_PREFIX "o" -# define PRIoLEAST8 __PRI8_PREFIX "o" -# define PRIoLEAST16 __PRI16_PREFIX "o" -# define PRIoLEAST32 __PRI32_PREFIX "o" -# define PRIoLEAST64 __PRI64_PREFIX "o" +# define PRIoLEAST8 __PRI_LEAST8_PREFIX "o" +# define PRIoLEAST16 __PRI_LEAST16_PREFIX "o" +# define PRIoLEAST32 __PRI_LEAST32_PREFIX "o" +# define PRIoLEAST64 __PRI_LEAST64_PREFIX "o" -# define PRIoFAST8 __PRI8_PREFIX "o" -# define PRIoFAST16 __PRIFAST16_PREFIX "o" -# define PRIoFAST32 __PRI32_PREFIX "o" - # define PRIoFAST64 __PRI64_PREFIX "o" +# define PRIoFAST8 __PRI_FAST8_PREFIX "o" +# define PRIoFAST16 __PRI_FAST16_PREFIX "o" +# define PRIoFAST32 __PRI_FAST32_PREFIX "o" + # define PRIoFAST64 __PRI_FAST64_PREFIX "o" /* Unsigned integers. */ # define PRIu8 __PRI8_PREFIX "u" @@ -87,15 +87,15 @@ __PUSH_FC_STDLIB # define PRIu32 __PRI32_PREFIX "u" # define PRIu64 __PRI64_PREFIX "u" -# define PRIuLEAST8 __PRI8_PREFIX "u" -# define PRIuLEAST16 __PRI16_PREFIX "u" -# define PRIuLEAST32 __PRI32_PREFIX "u" -# define PRIuLEAST64 __PRI64_PREFIX "u" +# define PRIuLEAST8 __PRI_LEAST8_PREFIX "u" +# define PRIuLEAST16 __PRI_LEAST16_PREFIX "u" +# define PRIuLEAST32 __PRI_LEAST32_PREFIX "u" +# define PRIuLEAST64 __PRI_LEAST64_PREFIX "u" -# define PRIuFAST8 __PRI8_PREFIX "u" -# define PRIuFAST16 __PRIFAST16_PREFIX "u" -# define PRIuFAST32 __PRI32_PREFIX "u" -# define PRIuFAST64 __PRI64_PREFIX "u" +# define PRIuFAST8 __PRI_FAST8_PREFIX "u" +# define PRIuFAST16 __PRI_FAST16_PREFIX "u" +# define PRIuFAST32 __PRI_FAST32_PREFIX "u" +# define PRIuFAST64 __PRI_FAST64_PREFIX "u" /* lowercase hexadecimal notation. */ # define PRIx8 __PRI8_PREFIX "x" @@ -103,15 +103,15 @@ __PUSH_FC_STDLIB # define PRIx32 __PRI32_PREFIX "x" # define PRIx64 __PRI64_PREFIX "x" -# define PRIxLEAST8 __PRI8_PREFIX "x" -# define PRIxLEAST16 __PRI16_PREFIX "x" -# define PRIxLEAST32 __PRI32_PREFIX "x" -# define PRIxLEAST64 __PRI64_PREFIX "x" +# define PRIxLEAST8 __PRI_LEAST8_PREFIX "x" +# define PRIxLEAST16 __PRI_LEAST16_PREFIX "x" +# define PRIxLEAST32 __PRI_LEAST32_PREFIX "x" +# define PRIxLEAST64 __PRI_LEAST64_PREFIX "x" -# define PRIxFAST8 __PRI8_PREFIX "x" -# define PRIxFAST16 __PRIFAST16_PREFIX "x" -# define PRIxFAST32 __PRI32_PREFIX "x" -# define PRIxFAST64 __PRI64_PREFIX "x" +# define PRIxFAST8 __PRI_FAST8_PREFIX "x" +# define PRIxFAST16 __PRI_FAST16_PREFIX "x" +# define PRIxFAST32 __PRI_FAST32_PREFIX "x" +# define PRIxFAST64 __PRI_FAST64_PREFIX "x" /* UPPERCASE hexadecimal notation. */ # define PRIX8 __PRI8_PREFIX "X" @@ -119,15 +119,15 @@ __PUSH_FC_STDLIB # define PRIX32 __PRI32_PREFIX "X" # define PRIX64 __PRI64_PREFIX "X" -# define PRIXLEAST8 __PRI8_PREFIX "X" -# define PRIXLEAST16 __PRI16_PREFIX "X" -# define PRIXLEAST32 __PRI32_PREFIX "X" -# define PRIXLEAST64 __PRI64_PREFIX "X" +# define PRIXLEAST8 __PRI_LEAST8_PREFIX "X" +# define PRIXLEAST16 __PRI_LEAST16_PREFIX "X" +# define PRIXLEAST32 __PRI_LEAST32_PREFIX "X" +# define PRIXLEAST64 __PRI_LEAST64_PREFIX "X" -# define PRIXFAST8 __PRI8_PREFIX "X" -# define PRIXFAST16 __PRIFAST16_PREFIX "X" -# define PRIXFAST32 __PRI32_PREFIX "X" -# define PRIXFAST64 __PRI64_PREFIX "X" +# define PRIXFAST8 __PRI_FAST8_PREFIX "X" +# define PRIXFAST16 __PRI_FAST16_PREFIX "X" +# define PRIXFAST32 __PRI_FAST32_PREFIX "X" +# define PRIXFAST64 __PRI_FAST64_PREFIX "X" /* Macros for printing `intmax_t' and `uintmax_t'. */ @@ -155,15 +155,15 @@ __PUSH_FC_STDLIB # define SCNd32 __PRI32_PREFIX "d" # define SCNd64 __PRI64_PREFIX "d" -# define SCNdLEAST8 __PRI8_PREFIX "d" -# define SCNdLEAST16 __PRI16_PREFIX "d" -# define SCNdLEAST32 __PRI32_PREFIX "d" -# define SCNdLEAST64 __PRI64_PREFIX "d" +# define SCNdLEAST8 __PRI_LEAST8_PREFIX "d" +# define SCNdLEAST16 __PRI_LEAST16_PREFIX "d" +# define SCNdLEAST32 __PRI_LEAST32_PREFIX "d" +# define SCNdLEAST64 __PRI_LEAST64_PREFIX "d" -# define SCNdFAST8 __PRI8_PREFIX "d" -# define SCNdFAST16 __PRIFAST16_PREFIX "d" -# define SCNdFAST32 __PRI32_PREFIX "d" -# define SCNdFAST64 __PRI64_PREFIX "d" +# define SCNdFAST8 __PRI_FAST8_PREFIX "d" +# define SCNdFAST16 __PRI_FAST16_PREFIX "d" +# define SCNdFAST32 __PRI_FAST32_PREFIX "d" +# define SCNdFAST64 __PRI_FAST64_PREFIX "d" /* Signed decimal notation. */ # define SCNi8 __PRI8_PREFIX "i" @@ -171,15 +171,15 @@ __PUSH_FC_STDLIB # define SCNi32 __PRI32_PREFIX "i" # define SCNi64 __PRI64_PREFIX "i" -# define SCNiLEAST8 __PRI8_PREFIX "i" -# define SCNiLEAST16 __PRI16_PREFIX "i" -# define SCNiLEAST32 __PRI32_PREFIX "i" -# define SCNiLEAST64 __PRI64_PREFIX "i" +# define SCNiLEAST8 __PRI_LEAST8_PREFIX "i" +# define SCNiLEAST16 __PRI_LEAST16_PREFIX "i" +# define SCNiLEAST32 __PRI_LEAST32_PREFIX "i" +# define SCNiLEAST64 __PRI_LEAST64_PREFIX "i" -# define SCNiFAST8 __PRI8_PREFIX "i" -# define SCNiFAST16 __PRIFAST16_PREFIX "i" -# define SCNiFAST32 __PRI32_PREFIX "i" -# define SCNiFAST64 __PRI64_PREFIX "i" +# define SCNiFAST8 __PRI_FAST8_PREFIX "i" +# define SCNiFAST16 __PRI_FAST16_PREFIX "i" +# define SCNiFAST32 __PRI_FAST32_PREFIX "i" +# define SCNiFAST64 __PRI_FAST64_PREFIX "i" /* Unsigned decimal notation. */ # define SCNu8 __PRI8_PREFIX "u" @@ -187,15 +187,15 @@ __PUSH_FC_STDLIB # define SCNu32 __PRI32_PREFIX "u" # define SCNu64 __PRI64_PREFIX "u" -# define SCNuLEAST8 __PRI8_PREFIX "u" -# define SCNuLEAST16 __PRI16_PREFIX "u" -# define SCNuLEAST32 __PRI32_PREFIX "u" -# define SCNuLEAST64 __PRI64_PREFIX "u" +# define SCNuLEAST8 __PRI_LEAST8_PREFIX "u" +# define SCNuLEAST16 __PRI_LEAST16_PREFIX "u" +# define SCNuLEAST32 __PRI_LEAST32_PREFIX "u" +# define SCNuLEAST64 __PRI_LEAST64_PREFIX "u" -# define SCNuFAST8 __PRI8_PREFIX "u" -# define SCNuFAST16 __PRIFAST16_PREFIX "u" -# define SCNuFAST32 __PRI32_PREFIX "u" -# define SCNuFAST64 __PRI64_PREFIX "u" +# define SCNuFAST8 __PRI_FAST8_PREFIX "u" +# define SCNuFAST16 __PRI_FAST16_PREFIX "u" +# define SCNuFAST32 __PRI_FAST32_PREFIX "u" +# define SCNuFAST64 __PRI_FAST64_PREFIX "u" /* Octal notation. */ # define SCNo8 __PRI8_PREFIX "o" @@ -203,15 +203,15 @@ __PUSH_FC_STDLIB # define SCNo32 __PRI32_PREFIX "o" # define SCNo64 __PRI64_PREFIX "o" -# define SCNoLEAST8 __PRI8_PREFIX "o" -# define SCNoLEAST16 __PRI16_PREFIX "o" -# define SCNoLEAST32 __PRI32_PREFIX "o" -# define SCNoLEAST64 __PRI64_PREFIX "o" +# define SCNoLEAST8 __PRI_LEAST8_PREFIX "o" +# define SCNoLEAST16 __PRI_LEAST16_PREFIX "o" +# define SCNoLEAST32 __PRI_LEAST32_PREFIX "o" +# define SCNoLEAST64 __PRI_LEAST64_PREFIX "o" -# define SCNoFAST8 __PRI8_PREFIX "o" -# define SCNoFAST16 __PRIFAST16_PREFIX "o" -# define SCNoFAST32 __PRI32_PREFIX "o" -# define SCNoFAST64 __PRI64_PREFIX "o" +# define SCNoFAST8 __PRI_FAST8_PREFIX "o" +# define SCNoFAST16 __PRI_FAST16_PREFIX "o" +# define SCNoFAST32 __PRI_FAST32_PREFIX "o" +# define SCNoFAST64 __PRI_FAST64_PREFIX "o" /* Hexadecimal notation. */ # define SCNx8 __PRI8_PREFIX "x" @@ -219,15 +219,15 @@ __PUSH_FC_STDLIB # define SCNx32 __PRI32_PREFIX "x" # define SCNx64 __PRI64_PREFIX "x" -# define SCNxLEAST8 __PRI8_PREFIX "x" -# define SCNxLEAST16 __PRI16_PREFIX "x" -# define SCNxLEAST32 __PRI32_PREFIX "x" -# define SCNxLEAST64 __PRI64_PREFIX "x" +# define SCNxLEAST8 __PRI_LEAST8_PREFIX "x" +# define SCNxLEAST16 __PRI_LEAST16_PREFIX "x" +# define SCNxLEAST32 __PRI_LEAST32_PREFIX "x" +# define SCNxLEAST64 __PRI_LEAST64_PREFIX "x" -# define SCNxFAST8 __PRI8_PREFIX "x" -# define SCNxFAST16 __PRIFAST16_PREFIX "x" -# define SCNxFAST32 __PRI32_PREFIX "x" -# define SCNxFAST64 __PRI64_PREFIX "x" +# define SCNxFAST8 __PRI_FAST8_PREFIX "x" +# define SCNxFAST16 __PRI_FAST16_PREFIX "x" +# define SCNxFAST32 __PRI_FAST32_PREFIX "x" +# define SCNxFAST64 __PRI_FAST64_PREFIX "x" /* Macros for scanning `intmax_t' and `uintmax_t'. */ @@ -289,4 +289,3 @@ __END_DECLS __POP_FC_STDLIB #endif - diff --git a/share/machdeps/machdep-schema.yaml b/share/machdeps/machdep-schema.yaml index fd2956acbcc..38d83deb099 100644 --- a/share/machdeps/machdep-schema.yaml +++ b/share/machdeps/machdep-schema.yaml @@ -136,6 +136,30 @@ has__builtin_va_list: type: boolean +int_fast8_t: + + description: definition of 'int_fast8_t' + + type: string + +int_fast16_t: + + description: definition of 'int_fast16_t' + + type: string + +int_fast32_t: + + description: definition of 'int_fast32_t' + + type: string + +int_fast64_t: + + description: definition of 'int_fast64_t' + + type: string + intptr_t: description: definition of 'intptr_t' @@ -280,6 +304,30 @@ tmp_max: type: string +uint_fast8_t: + + description: definition of 'uint_fast8_t' + + type: string + +uint_fast16_t: + + description: definition of 'uint_fast16_t' + + type: string + +uint_fast32_t: + + description: definition of 'uint_fast32_t' + + type: string + +uint_fast64_t: + + description: definition of 'uint_fast64_t' + + type: string + uintptr_t: description: definition of 'uintptr_t' diff --git a/share/machdeps/machdep_avr_16.yaml b/share/machdeps/machdep_avr_16.yaml index be0110cb5e3..9d27004bf79 100644 --- a/share/machdeps/machdep_avr_16.yaml +++ b/share/machdeps/machdep_avr_16.yaml @@ -141,6 +141,10 @@ errno: filename_max: '4096' fopen_max: '16' has__builtin_va_list: true +int_fast16_t: int +int_fast32_t: int +int_fast64_t: long long +int_fast8_t: signed char intptr_t: int l_tmpnam: '20' little_endian: true @@ -165,6 +169,10 @@ sizeof_void: 1 ssize_t: int time_t: long tmp_max: '238328' +uint_fast16_t: unsigned int +uint_fast32_t: unsigned int +uint_fast64_t: unsigned long long +uint_fast8_t: unsigned char uintptr_t: unsigned int version: clang version 15.0.7 wchar_t: int diff --git a/share/machdeps/machdep_gcc_x86_16.yaml b/share/machdeps/machdep_gcc_x86_16.yaml index 118a19fb154..999181ba2de 100644 --- a/share/machdeps/machdep_gcc_x86_16.yaml +++ b/share/machdeps/machdep_gcc_x86_16.yaml @@ -135,6 +135,10 @@ errno: exdev: '18' exfull: '54' has__builtin_va_list: true +int_fast8_t: signed char +int_fast16_t: signed int +int_fast32_t: long +int_fast64_t: long long intptr_t: long little_endian: true nsig: '65' @@ -153,6 +157,10 @@ sizeof_short: 2 sizeof_void: 1 ssize_t: int time_t: long +uint_fast8_t: unsigned char +uint_fast16_t: unsigned int +uint_fast32_t: unsigned long +uint_fast64_t: unsigned long long uintptr_t: unsigned long version: none wchar_t: int diff --git a/share/machdeps/machdep_gcc_x86_32.yaml b/share/machdeps/machdep_gcc_x86_32.yaml index 86de296ecf7..53620c5a55d 100644 --- a/share/machdeps/machdep_gcc_x86_32.yaml +++ b/share/machdeps/machdep_gcc_x86_32.yaml @@ -139,6 +139,10 @@ errno: filename_max: '4096' fopen_max: '16' has__builtin_va_list: true +int_fast16_t: int +int_fast32_t: int +int_fast64_t: long long +int_fast8_t: signed char intptr_t: int l_tmpnam: '20' little_endian: true @@ -163,6 +167,10 @@ sizeof_void: 1 ssize_t: int time_t: long tmp_max: '238328' +uint_fast16_t: unsigned int +uint_fast32_t: unsigned int +uint_fast64_t: unsigned long long +uint_fast8_t: unsigned char uintptr_t: unsigned int version: gcc (GCC) 12.2.1 20230201 wchar_t: long diff --git a/share/machdeps/machdep_gcc_x86_64.yaml b/share/machdeps/machdep_gcc_x86_64.yaml index 8e471be4afa..762187987d1 100644 --- a/share/machdeps/machdep_gcc_x86_64.yaml +++ b/share/machdeps/machdep_gcc_x86_64.yaml @@ -139,6 +139,10 @@ errno: filename_max: '4096' fopen_max: '16' has__builtin_va_list: true +int_fast16_t: long +int_fast32_t: long +int_fast64_t: long +int_fast8_t: signed char intptr_t: long l_tmpnam: '20' little_endian: true @@ -163,6 +167,10 @@ sizeof_void: 1 ssize_t: long time_t: long tmp_max: '238328' +uint_fast16_t: unsigned long +uint_fast32_t: unsigned long +uint_fast64_t: unsigned long +uint_fast8_t: unsigned char uintptr_t: unsigned long version: gcc (GCC) 12.2.1 20230201 wchar_t: int diff --git a/share/machdeps/machdep_msvc_x86_64.yaml b/share/machdeps/machdep_msvc_x86_64.yaml index aec2dd33a28..39aaae34bab 100644 --- a/share/machdeps/machdep_msvc_x86_64.yaml +++ b/share/machdeps/machdep_msvc_x86_64.yaml @@ -94,6 +94,10 @@ errno: eownerdead: '133' enotrecoverable: '127' has__builtin_va_list: false +int_fast8_t: signed char +int_fast16_t: signed int +int_fast32_t: signed int +int_fast64_t: signed long long intptr_t: signed long long little_endian: true nsig: '23' @@ -113,6 +117,10 @@ sizeof_short: 2 sizeof_void: 0 ssize_t: long long time_t: long long +uint_fast8_t: unsigned char +uint_fast16_t: unsigned int +uint_fast32_t: unsigned int +uint_fast64_t: unsigned long long uintptr_t: unsigned long long version: MSVC - X86-64bits mode wchar_t: unsigned short diff --git a/share/machdeps/machdep_ppc_32.yaml b/share/machdeps/machdep_ppc_32.yaml index a295dd8ab58..57d62e62f9b 100644 --- a/share/machdeps/machdep_ppc_32.yaml +++ b/share/machdeps/machdep_ppc_32.yaml @@ -141,6 +141,10 @@ errno: filename_max: '4096' fopen_max: '16' has__builtin_va_list: true +int_fast16_t: int +int_fast32_t: int +int_fast64_t: long long +int_fast8_t: signed char intptr_t: int l_tmpnam: '20' little_endian: false @@ -165,6 +169,10 @@ sizeof_void: 1 ssize_t: int time_t: long tmp_max: '238328' +uint_fast16_t: unsigned int +uint_fast32_t: unsigned int +uint_fast64_t: unsigned long long +uint_fast8_t: unsigned char uintptr_t: unsigned int version: clang version 15.0.7 wchar_t: int diff --git a/share/machdeps/machdep_x86_16.yaml b/share/machdeps/machdep_x86_16.yaml index 276ec58c4c6..5f90098938e 100644 --- a/share/machdeps/machdep_x86_16.yaml +++ b/share/machdeps/machdep_x86_16.yaml @@ -135,6 +135,10 @@ errno: exdev: '18' exfull: '54' has__builtin_va_list: true +int_fast8_t: signed char +int_fast16_t: signed int +int_fast32_t: long +int_fast64_t: long long intptr_t: long little_endian: true nsig: '65' @@ -153,6 +157,10 @@ sizeof_short: 2 sizeof_void: -1 ssize_t: int time_t: long +uint_fast8_t: unsigned char +uint_fast16_t: unsigned int +uint_fast32_t: unsigned long +uint_fast64_t: unsigned long long uintptr_t: unsigned long version: none wchar_t: int diff --git a/share/machdeps/machdep_x86_32.yaml b/share/machdeps/machdep_x86_32.yaml index 5b8d5ad1fe6..63513825a26 100644 --- a/share/machdeps/machdep_x86_32.yaml +++ b/share/machdeps/machdep_x86_32.yaml @@ -139,6 +139,10 @@ errno: filename_max: '4096' fopen_max: '16' has__builtin_va_list: true +int_fast16_t: int +int_fast32_t: int +int_fast64_t: long long +int_fast8_t: signed char intptr_t: int l_tmpnam: '20' little_endian: true @@ -163,6 +167,10 @@ sizeof_void: -1 ssize_t: int time_t: long tmp_max: '238328' +uint_fast16_t: unsigned int +uint_fast32_t: unsigned int +uint_fast64_t: unsigned long long +uint_fast8_t: unsigned char uintptr_t: unsigned int version: gcc (GCC) 12.2.1 20230201 wchar_t: long diff --git a/share/machdeps/machdep_x86_64.yaml b/share/machdeps/machdep_x86_64.yaml index c572ec0c4a1..7852eb877a8 100644 --- a/share/machdeps/machdep_x86_64.yaml +++ b/share/machdeps/machdep_x86_64.yaml @@ -139,6 +139,10 @@ errno: filename_max: '4096' fopen_max: '16' has__builtin_va_list: true +int_fast16_t: long +int_fast32_t: long +int_fast64_t: long +int_fast8_t: signed char intptr_t: long l_tmpnam: '20' little_endian: true @@ -163,6 +167,10 @@ sizeof_void: -1 ssize_t: long time_t: long tmp_max: '238328' +uint_fast16_t: unsigned long +uint_fast32_t: unsigned long +uint_fast64_t: unsigned long +uint_fast8_t: unsigned char uintptr_t: unsigned long version: gcc (GCC) 12.2.1 20230201 wchar_t: int diff --git a/share/machdeps/make_machdep/int_fast16_t.c b/share/machdeps/make_machdep/int_fast16_t.c new file mode 100644 index 00000000000..77a451ab2da --- /dev/null +++ b/share/machdeps/make_machdep/int_fast16_t.c @@ -0,0 +1,31 @@ +/**************************************************************************/ +/* */ +/* This file is part of Frama-C. */ +/* */ +/* Copyright (C) 2007-2023 */ +/* CEA (Commissariat à l'énergie atomique et aux énergies */ +/* alternatives) */ +/* */ +/* you can redistribute it and/or modify it under the terms of the GNU */ +/* Lesser General Public License as published by the Free Software */ +/* Foundation, version 2.1. */ +/* */ +/* It is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU Lesser General Public License for more details. */ +/* */ +/* See the GNU Lesser General Public License version 2.1 */ +/* for more details (enclosed in the file licenses/LGPLv2.1). */ +/* */ +/**************************************************************************/ + +#include "make_machdep_common.h" +#include <stdint.h> +#define TEST_TYPE int_fast16_t + +TEST_TYPE_IS(signed char); +TEST_TYPE_IS(short); +TEST_TYPE_IS(int); +TEST_TYPE_IS(long); +TEST_TYPE_IS(long long); diff --git a/share/machdeps/make_machdep/int_fast32_t.c b/share/machdeps/make_machdep/int_fast32_t.c new file mode 100644 index 00000000000..fbbfee3a162 --- /dev/null +++ b/share/machdeps/make_machdep/int_fast32_t.c @@ -0,0 +1,31 @@ +/**************************************************************************/ +/* */ +/* This file is part of Frama-C. */ +/* */ +/* Copyright (C) 2007-2023 */ +/* CEA (Commissariat à l'énergie atomique et aux énergies */ +/* alternatives) */ +/* */ +/* you can redistribute it and/or modify it under the terms of the GNU */ +/* Lesser General Public License as published by the Free Software */ +/* Foundation, version 2.1. */ +/* */ +/* It is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU Lesser General Public License for more details. */ +/* */ +/* See the GNU Lesser General Public License version 2.1 */ +/* for more details (enclosed in the file licenses/LGPLv2.1). */ +/* */ +/**************************************************************************/ + +#include "make_machdep_common.h" +#include <stdint.h> +#define TEST_TYPE int_fast32_t + +TEST_TYPE_IS(signed char); +TEST_TYPE_IS(short); +TEST_TYPE_IS(int); +TEST_TYPE_IS(long); +TEST_TYPE_IS(long long); diff --git a/share/machdeps/make_machdep/int_fast64_t.c b/share/machdeps/make_machdep/int_fast64_t.c new file mode 100644 index 00000000000..43b3ce1797a --- /dev/null +++ b/share/machdeps/make_machdep/int_fast64_t.c @@ -0,0 +1,31 @@ +/**************************************************************************/ +/* */ +/* This file is part of Frama-C. */ +/* */ +/* Copyright (C) 2007-2023 */ +/* CEA (Commissariat à l'énergie atomique et aux énergies */ +/* alternatives) */ +/* */ +/* you can redistribute it and/or modify it under the terms of the GNU */ +/* Lesser General Public License as published by the Free Software */ +/* Foundation, version 2.1. */ +/* */ +/* It is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU Lesser General Public License for more details. */ +/* */ +/* See the GNU Lesser General Public License version 2.1 */ +/* for more details (enclosed in the file licenses/LGPLv2.1). */ +/* */ +/**************************************************************************/ + +#include "make_machdep_common.h" +#include <stdint.h> +#define TEST_TYPE int_fast64_t + +TEST_TYPE_IS(signed char); +TEST_TYPE_IS(short); +TEST_TYPE_IS(int); +TEST_TYPE_IS(long); +TEST_TYPE_IS(long long); diff --git a/share/machdeps/make_machdep/int_fast8_t.c b/share/machdeps/make_machdep/int_fast8_t.c new file mode 100644 index 00000000000..6d572f914de --- /dev/null +++ b/share/machdeps/make_machdep/int_fast8_t.c @@ -0,0 +1,31 @@ +/**************************************************************************/ +/* */ +/* This file is part of Frama-C. */ +/* */ +/* Copyright (C) 2007-2023 */ +/* CEA (Commissariat à l'énergie atomique et aux énergies */ +/* alternatives) */ +/* */ +/* you can redistribute it and/or modify it under the terms of the GNU */ +/* Lesser General Public License as published by the Free Software */ +/* Foundation, version 2.1. */ +/* */ +/* It is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU Lesser General Public License for more details. */ +/* */ +/* See the GNU Lesser General Public License version 2.1 */ +/* for more details (enclosed in the file licenses/LGPLv2.1). */ +/* */ +/**************************************************************************/ + +#include "make_machdep_common.h" +#include <stdint.h> +#define TEST_TYPE int_fast8_t + +TEST_TYPE_IS(signed char); +TEST_TYPE_IS(short); +TEST_TYPE_IS(int); +TEST_TYPE_IS(long); +TEST_TYPE_IS(long long); diff --git a/share/machdeps/make_machdep/make_machdep.py b/share/machdeps/make_machdep/make_machdep.py index 531334e8659..8c49b8e495b 100755 --- a/share/machdeps/make_machdep/make_machdep.py +++ b/share/machdeps/make_machdep/make_machdep.py @@ -186,6 +186,14 @@ source_files = [ ("ptrdiff_t.c", "type"), ("intptr_t.c", "type"), ("uintptr_t.c", "type"), + ("int_fast8_t.c", "type"), + ("int_fast16_t.c", "type"), + ("int_fast32_t.c", "type"), + ("int_fast64_t.c", "type"), + ("uint_fast8_t.c", "type"), + ("uint_fast16_t.c", "type"), + ("uint_fast32_t.c", "type"), + ("uint_fast64_t.c", "type"), ("wint_t.c", "type"), ("sig_atomic_t.c", "type"), ("time_t.c", "type"), diff --git a/share/machdeps/make_machdep/uint_fast16_t.c b/share/machdeps/make_machdep/uint_fast16_t.c new file mode 100644 index 00000000000..8b6524211c8 --- /dev/null +++ b/share/machdeps/make_machdep/uint_fast16_t.c @@ -0,0 +1,31 @@ +/**************************************************************************/ +/* */ +/* This file is part of Frama-C. */ +/* */ +/* Copyright (C) 2007-2023 */ +/* CEA (Commissariat à l'énergie atomique et aux énergies */ +/* alternatives) */ +/* */ +/* you can redistribute it and/or modify it under the terms of the GNU */ +/* Lesser General Public License as published by the Free Software */ +/* Foundation, version 2.1. */ +/* */ +/* It is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU Lesser General Public License for more details. */ +/* */ +/* See the GNU Lesser General Public License version 2.1 */ +/* for more details (enclosed in the file licenses/LGPLv2.1). */ +/* */ +/**************************************************************************/ + +#include "make_machdep_common.h" +#include <stdint.h> +#define TEST_TYPE uint_fast16_t + +TEST_TYPE_IS(unsigned char); +TEST_TYPE_IS(unsigned short); +TEST_TYPE_IS(unsigned int); +TEST_TYPE_IS(unsigned long); +TEST_TYPE_IS(unsigned long long); diff --git a/share/machdeps/make_machdep/uint_fast32_t.c b/share/machdeps/make_machdep/uint_fast32_t.c new file mode 100644 index 00000000000..ff8e7cbe8f5 --- /dev/null +++ b/share/machdeps/make_machdep/uint_fast32_t.c @@ -0,0 +1,31 @@ +/**************************************************************************/ +/* */ +/* This file is part of Frama-C. */ +/* */ +/* Copyright (C) 2007-2023 */ +/* CEA (Commissariat à l'énergie atomique et aux énergies */ +/* alternatives) */ +/* */ +/* you can redistribute it and/or modify it under the terms of the GNU */ +/* Lesser General Public License as published by the Free Software */ +/* Foundation, version 2.1. */ +/* */ +/* It is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU Lesser General Public License for more details. */ +/* */ +/* See the GNU Lesser General Public License version 2.1 */ +/* for more details (enclosed in the file licenses/LGPLv2.1). */ +/* */ +/**************************************************************************/ + +#include "make_machdep_common.h" +#include <stdint.h> +#define TEST_TYPE uint_fast32_t + +TEST_TYPE_IS(unsigned char); +TEST_TYPE_IS(unsigned short); +TEST_TYPE_IS(unsigned int); +TEST_TYPE_IS(unsigned long); +TEST_TYPE_IS(unsigned long long); diff --git a/share/machdeps/make_machdep/uint_fast64_t.c b/share/machdeps/make_machdep/uint_fast64_t.c new file mode 100644 index 00000000000..5dbc103bd28 --- /dev/null +++ b/share/machdeps/make_machdep/uint_fast64_t.c @@ -0,0 +1,31 @@ +/**************************************************************************/ +/* */ +/* This file is part of Frama-C. */ +/* */ +/* Copyright (C) 2007-2023 */ +/* CEA (Commissariat à l'énergie atomique et aux énergies */ +/* alternatives) */ +/* */ +/* you can redistribute it and/or modify it under the terms of the GNU */ +/* Lesser General Public License as published by the Free Software */ +/* Foundation, version 2.1. */ +/* */ +/* It is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU Lesser General Public License for more details. */ +/* */ +/* See the GNU Lesser General Public License version 2.1 */ +/* for more details (enclosed in the file licenses/LGPLv2.1). */ +/* */ +/**************************************************************************/ + +#include "make_machdep_common.h" +#include <stdint.h> +#define TEST_TYPE uint_fast64_t + +TEST_TYPE_IS(unsigned char); +TEST_TYPE_IS(unsigned short); +TEST_TYPE_IS(unsigned int); +TEST_TYPE_IS(unsigned long); +TEST_TYPE_IS(unsigned long long); diff --git a/share/machdeps/make_machdep/uint_fast8_t.c b/share/machdeps/make_machdep/uint_fast8_t.c new file mode 100644 index 00000000000..d7710d97b00 --- /dev/null +++ b/share/machdeps/make_machdep/uint_fast8_t.c @@ -0,0 +1,31 @@ +/**************************************************************************/ +/* */ +/* This file is part of Frama-C. */ +/* */ +/* Copyright (C) 2007-2023 */ +/* CEA (Commissariat à l'énergie atomique et aux énergies */ +/* alternatives) */ +/* */ +/* you can redistribute it and/or modify it under the terms of the GNU */ +/* Lesser General Public License as published by the Free Software */ +/* Foundation, version 2.1. */ +/* */ +/* It is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU Lesser General Public License for more details. */ +/* */ +/* See the GNU Lesser General Public License version 2.1 */ +/* for more details (enclosed in the file licenses/LGPLv2.1). */ +/* */ +/**************************************************************************/ + +#include "make_machdep_common.h" +#include <stdint.h> +#define TEST_TYPE uint_fast8_t + +TEST_TYPE_IS(unsigned char); +TEST_TYPE_IS(unsigned short); +TEST_TYPE_IS(unsigned int); +TEST_TYPE_IS(unsigned long); +TEST_TYPE_IS(unsigned long long); diff --git a/src/kernel_internals/runtime/machdep.ml b/src/kernel_internals/runtime/machdep.ml index a5cbdd49eb3..127f612a11e 100644 --- a/src/kernel_internals/runtime/machdep.ml +++ b/src/kernel_internals/runtime/machdep.ml @@ -148,8 +148,7 @@ let gen_fixed_size_family fmt bitsize mach = | Some (exact_size, kind) -> if size = exact_size then gen_int_type_family fmt (string_of_int bitsize) bitsize kind; - gen_int_type_family fmt ("_LEAST" ^ string_of_int bitsize) bitsize kind; - gen_int_type_family fmt ("_FAST" ^ string_of_int bitsize) bitsize kind + gen_int_type_family fmt ("_LEAST" ^ string_of_int bitsize) bitsize kind let gen_max_size_int fmt mach = gen_int_type_family fmt "MAX" (8 * mach.sizeof_longlong) "long long" @@ -194,6 +193,16 @@ let gen_intlike_max fmt name repr mach = let repr_name, _ = List.assoc repr (std_type_name mach) in gen_define_string fmt macro ("__FC_" ^ repr_name ^ "_MAX") +let gen_fast_int fmt bitsize signed repr mach = + let name = Format.sprintf "_FAST%d" bitsize in + let full_name = + Format.sprintf "__%sINT%s" (if signed then "" else "U") name + in + gen_define_string fmt (full_name ^ "_T") repr; + if signed then gen_intlike_min fmt full_name repr mach; + gen_intlike_max fmt full_name repr mach; + if signed then gen_define_printing_prefix fmt name (no_signedness repr) + (* assuming all archs have an 8-bit char. In any case, if we end up dealing with something else at some point, machdep will not be the only place were changes will be required. *) @@ -212,6 +221,14 @@ let gen_all_defines fmt mach = gen_fixed_size_family fmt 16 mach; gen_fixed_size_family fmt 32 mach; gen_fixed_size_family fmt 64 mach; + gen_fast_int fmt 8 true mach.int_fast8_t mach; + gen_fast_int fmt 16 true mach.int_fast16_t mach; + gen_fast_int fmt 32 true mach.int_fast32_t mach; + gen_fast_int fmt 64 true mach.int_fast64_t mach; + gen_fast_int fmt 8 false mach.uint_fast8_t mach; + gen_fast_int fmt 16 false mach.uint_fast16_t mach; + gen_fast_int fmt 32 false mach.uint_fast32_t mach; + gen_fast_int fmt 64 false mach.uint_fast64_t mach; gen_max_size_int fmt mach; gen_std_min_max fmt mach; gen_va_list_repr fmt mach; diff --git a/src/kernel_services/ast_data/cil_types.ml b/src/kernel_services/ast_data/cil_types.ml index a42c8f7076d..55986d1421a 100644 --- a/src/kernel_services/ast_data/cil_types.ml +++ b/src/kernel_services/ast_data/cil_types.ml @@ -1881,6 +1881,14 @@ type mach = { ptrdiff_t: string; (* Type of "ptrdiff_t" *) intptr_t: string; (* Type of "intptr_t" *) uintptr_t: string; (* Type of "uintptr_t" *) + int_fast8_t: string; (* Type of "int_fast8_t" *) + int_fast16_t: string; (* Type of "int_fast16_t" *) + int_fast32_t: string; (* Type of "int_fast32_t" *) + int_fast64_t: string; (* Type of "int_fast64_t" *) + uint_fast8_t: string; (* Type of "uint_fast8_t" *) + uint_fast16_t: string; (* Type of "uint_fast16_t" *) + uint_fast32_t: string; (* Type of "uint_fast32_t" *) + uint_fast64_t: string; (* Type of "uint_fast64_t" *) wint_t: string; (* Type of "wint_t" *) sig_atomic_t: string; (* Type of "sig_atomic_t" *) time_t: string; (* Type of "time_t" *) diff --git a/src/kernel_services/ast_queries/cil_datatype.ml b/src/kernel_services/ast_queries/cil_datatype.ml index b92229e2a90..80698e87233 100644 --- a/src/kernel_services/ast_queries/cil_datatype.ml +++ b/src/kernel_services/ast_queries/cil_datatype.ml @@ -2645,6 +2645,14 @@ let dummy_machdep = ptrdiff_t = "long"; intptr_t = "long"; (* Type of "intptr_t" *) uintptr_t = "unsigned long"; (* Type of "uintptr_t" *) + int_fast8_t = "signed char"; + int_fast16_t = "long"; + int_fast32_t = "long"; + int_fast64_t = "long"; + uint_fast8_t = "unsigned char"; + uint_fast16_t = "unsigned long"; + uint_fast32_t = "unsigned long"; + uint_fast64_t = "unsigned long"; wint_t = "int"; sig_atomic_t = "int"; time_t = "long"; diff --git a/src/kernel_services/ast_queries/file.ml b/src/kernel_services/ast_queries/file.ml index 2431ccb6c45..3f8d916dac7 100644 --- a/src/kernel_services/ast_queries/file.ml +++ b/src/kernel_services/ast_queries/file.ml @@ -363,6 +363,14 @@ type mach = Cil_types.mach = { ptrdiff_t: string; intptr_t: string; uintptr_t: string; + int_fast8_t: string; + int_fast16_t: string; + int_fast32_t: string; + int_fast64_t: string; + uint_fast8_t: string; + uint_fast16_t: string; + uint_fast32_t: string; + uint_fast64_t: string; wint_t: string; sig_atomic_t: string; time_t: string; diff --git a/tests/libc/oracle/inttypes_h.2.res.oracle b/tests/libc/oracle/inttypes_h.2.res.oracle index 92f400d2eb0..df0cd81b6ed 100644 --- a/tests/libc/oracle/inttypes_h.2.res.oracle +++ b/tests/libc/oracle/inttypes_h.2.res.oracle @@ -1641,7 +1641,7 @@ int printf_va_54(char const * restrict format, int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_55(char const * restrict format, int *param0); +int scanf_va_55(char const * restrict format, long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1654,7 +1654,7 @@ int scanf_va_55(char const * restrict format, int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_55(char const * restrict format, int param0); +int printf_va_55(char const * restrict format, long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1671,7 +1671,7 @@ int printf_va_55(char const * restrict format, int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_56(char const * restrict format, int *param0); +int scanf_va_56(char const * restrict format, long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1684,7 +1684,7 @@ int scanf_va_56(char const * restrict format, int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_56(char const * restrict format, int param0); +int printf_va_56(char const * restrict format, long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1701,7 +1701,7 @@ int printf_va_56(char const * restrict format, int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_57(char const * restrict format, unsigned int *param0); +int scanf_va_57(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1714,7 +1714,7 @@ int scanf_va_57(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_57(char const * restrict format, unsigned int param0); +int printf_va_57(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1731,7 +1731,7 @@ int printf_va_57(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_58(char const * restrict format, unsigned int *param0); +int scanf_va_58(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1744,7 +1744,7 @@ int scanf_va_58(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_58(char const * restrict format, unsigned int param0); +int printf_va_58(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1761,7 +1761,7 @@ int printf_va_58(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_59(char const * restrict format, unsigned int *param0); +int scanf_va_59(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1774,7 +1774,7 @@ int scanf_va_59(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_59(char const * restrict format, unsigned int param0); +int printf_va_59(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1791,7 +1791,7 @@ int printf_va_59(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_60(char const * restrict format, unsigned int *param0); +int scanf_va_60(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1804,7 +1804,7 @@ int scanf_va_60(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_60(char const * restrict format, unsigned int param0); +int printf_va_60(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1821,7 +1821,7 @@ int printf_va_60(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_61(char const * restrict format, int *param0); +int scanf_va_61(char const * restrict format, long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1834,7 +1834,7 @@ int scanf_va_61(char const * restrict format, int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_61(char const * restrict format, int param0); +int printf_va_61(char const * restrict format, long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1851,7 +1851,7 @@ int printf_va_61(char const * restrict format, int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_62(char const * restrict format, int *param0); +int scanf_va_62(char const * restrict format, long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1864,7 +1864,7 @@ int scanf_va_62(char const * restrict format, int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_62(char const * restrict format, int param0); +int printf_va_62(char const * restrict format, long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1881,7 +1881,7 @@ int printf_va_62(char const * restrict format, int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_63(char const * restrict format, unsigned int *param0); +int scanf_va_63(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1894,7 +1894,7 @@ int scanf_va_63(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_63(char const * restrict format, unsigned int param0); +int printf_va_63(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1911,7 +1911,7 @@ int printf_va_63(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_64(char const * restrict format, unsigned int *param0); +int scanf_va_64(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1924,7 +1924,7 @@ int scanf_va_64(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_64(char const * restrict format, unsigned int param0); +int printf_va_64(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1941,7 +1941,7 @@ int printf_va_64(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_65(char const * restrict format, unsigned int *param0); +int scanf_va_65(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1954,7 +1954,7 @@ int scanf_va_65(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_65(char const * restrict format, unsigned int param0); +int printf_va_65(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1971,7 +1971,7 @@ int printf_va_65(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_66(char const * restrict format, unsigned int *param0); +int scanf_va_66(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1984,7 +1984,7 @@ int scanf_va_66(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_66(char const * restrict format, unsigned int param0); +int printf_va_66(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -2693,39 +2693,39 @@ int main(void) } { int_fast16_t x_17; - scanf("%d",& x_17); /* scanf_va_55 */ - printf("%d",x_17); /* printf_va_55 */ - scanf("%i",& x_17); /* scanf_va_56 */ - printf("%i",x_17); /* printf_va_56 */ + scanf("%ld",& x_17); /* scanf_va_55 */ + printf("%ld",x_17); /* printf_va_55 */ + scanf("%li",& x_17); /* scanf_va_56 */ + printf("%li",x_17); /* printf_va_56 */ } { uint_fast16_t x_18; - scanf("%o",& x_18); /* scanf_va_57 */ - printf("%o",x_18); /* printf_va_57 */ - scanf("%u",& x_18); /* scanf_va_58 */ - printf("%u",x_18); /* printf_va_58 */ - scanf("%x",& x_18); /* scanf_va_59 */ - printf("%x",x_18); /* printf_va_59 */ - scanf("%x",& x_18); /* scanf_va_60 */ - printf("%X",x_18); /* printf_va_60 */ + scanf("%lo",& x_18); /* scanf_va_57 */ + printf("%lo",x_18); /* printf_va_57 */ + scanf("%lu",& x_18); /* scanf_va_58 */ + printf("%lu",x_18); /* printf_va_58 */ + scanf("%lx",& x_18); /* scanf_va_59 */ + printf("%lx",x_18); /* printf_va_59 */ + scanf("%lx",& x_18); /* scanf_va_60 */ + printf("%lX",x_18); /* printf_va_60 */ } { int_fast32_t x_19; - scanf("%d",& x_19); /* scanf_va_61 */ - printf("%d",x_19); /* printf_va_61 */ - scanf("%i",& x_19); /* scanf_va_62 */ - printf("%i",x_19); /* printf_va_62 */ + scanf("%ld",& x_19); /* scanf_va_61 */ + printf("%ld",x_19); /* printf_va_61 */ + scanf("%li",& x_19); /* scanf_va_62 */ + printf("%li",x_19); /* printf_va_62 */ } { uint_fast32_t x_20; - scanf("%o",& x_20); /* scanf_va_63 */ - printf("%o",x_20); /* printf_va_63 */ - scanf("%u",& x_20); /* scanf_va_64 */ - printf("%u",x_20); /* printf_va_64 */ - scanf("%x",& x_20); /* scanf_va_65 */ - printf("%x",x_20); /* printf_va_65 */ - scanf("%x",& x_20); /* scanf_va_66 */ - printf("%X",x_20); /* printf_va_66 */ + scanf("%lo",& x_20); /* scanf_va_63 */ + printf("%lo",x_20); /* printf_va_63 */ + scanf("%lu",& x_20); /* scanf_va_64 */ + printf("%lu",x_20); /* printf_va_64 */ + scanf("%lx",& x_20); /* scanf_va_65 */ + printf("%lx",x_20); /* printf_va_65 */ + scanf("%lx",& x_20); /* scanf_va_66 */ + printf("%lX",x_20); /* printf_va_66 */ } { int_fast64_t x_21; diff --git a/tests/libc/oracle/inttypes_h.5.res.oracle b/tests/libc/oracle/inttypes_h.5.res.oracle index 92f400d2eb0..df0cd81b6ed 100644 --- a/tests/libc/oracle/inttypes_h.5.res.oracle +++ b/tests/libc/oracle/inttypes_h.5.res.oracle @@ -1641,7 +1641,7 @@ int printf_va_54(char const * restrict format, int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_55(char const * restrict format, int *param0); +int scanf_va_55(char const * restrict format, long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1654,7 +1654,7 @@ int scanf_va_55(char const * restrict format, int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_55(char const * restrict format, int param0); +int printf_va_55(char const * restrict format, long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1671,7 +1671,7 @@ int printf_va_55(char const * restrict format, int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_56(char const * restrict format, int *param0); +int scanf_va_56(char const * restrict format, long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1684,7 +1684,7 @@ int scanf_va_56(char const * restrict format, int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_56(char const * restrict format, int param0); +int printf_va_56(char const * restrict format, long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1701,7 +1701,7 @@ int printf_va_56(char const * restrict format, int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_57(char const * restrict format, unsigned int *param0); +int scanf_va_57(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1714,7 +1714,7 @@ int scanf_va_57(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_57(char const * restrict format, unsigned int param0); +int printf_va_57(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1731,7 +1731,7 @@ int printf_va_57(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_58(char const * restrict format, unsigned int *param0); +int scanf_va_58(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1744,7 +1744,7 @@ int scanf_va_58(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_58(char const * restrict format, unsigned int param0); +int printf_va_58(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1761,7 +1761,7 @@ int printf_va_58(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_59(char const * restrict format, unsigned int *param0); +int scanf_va_59(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1774,7 +1774,7 @@ int scanf_va_59(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_59(char const * restrict format, unsigned int param0); +int printf_va_59(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1791,7 +1791,7 @@ int printf_va_59(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_60(char const * restrict format, unsigned int *param0); +int scanf_va_60(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1804,7 +1804,7 @@ int scanf_va_60(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_60(char const * restrict format, unsigned int param0); +int printf_va_60(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1821,7 +1821,7 @@ int printf_va_60(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_61(char const * restrict format, int *param0); +int scanf_va_61(char const * restrict format, long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1834,7 +1834,7 @@ int scanf_va_61(char const * restrict format, int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_61(char const * restrict format, int param0); +int printf_va_61(char const * restrict format, long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1851,7 +1851,7 @@ int printf_va_61(char const * restrict format, int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_62(char const * restrict format, int *param0); +int scanf_va_62(char const * restrict format, long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1864,7 +1864,7 @@ int scanf_va_62(char const * restrict format, int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_62(char const * restrict format, int param0); +int printf_va_62(char const * restrict format, long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1881,7 +1881,7 @@ int printf_va_62(char const * restrict format, int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_63(char const * restrict format, unsigned int *param0); +int scanf_va_63(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1894,7 +1894,7 @@ int scanf_va_63(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_63(char const * restrict format, unsigned int param0); +int printf_va_63(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1911,7 +1911,7 @@ int printf_va_63(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_64(char const * restrict format, unsigned int *param0); +int scanf_va_64(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1924,7 +1924,7 @@ int scanf_va_64(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_64(char const * restrict format, unsigned int param0); +int printf_va_64(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1941,7 +1941,7 @@ int printf_va_64(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_65(char const * restrict format, unsigned int *param0); +int scanf_va_65(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1954,7 +1954,7 @@ int scanf_va_65(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_65(char const * restrict format, unsigned int param0); +int printf_va_65(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -1971,7 +1971,7 @@ int printf_va_65(char const * restrict format, unsigned int param0); \from (indirect: __fc_stdin->__fc_FILE_id), __fc_stdin->__fc_FILE_data, (indirect: *(format + (0 ..))); */ -int scanf_va_66(char const * restrict format, unsigned int *param0); +int scanf_va_66(char const * restrict format, unsigned long *param0); /*@ requires valid_read_string(format); assigns \result, __fc_stdout->__fc_FILE_data; @@ -1984,7 +1984,7 @@ int scanf_va_66(char const * restrict format, unsigned int *param0); __fc_stdout->__fc_FILE_data, (indirect: *(format + (0 ..))), param0; */ -int printf_va_66(char const * restrict format, unsigned int param0); +int printf_va_66(char const * restrict format, unsigned long param0); /*@ requires \valid(param0); requires valid_read_string(format); @@ -2693,39 +2693,39 @@ int main(void) } { int_fast16_t x_17; - scanf("%d",& x_17); /* scanf_va_55 */ - printf("%d",x_17); /* printf_va_55 */ - scanf("%i",& x_17); /* scanf_va_56 */ - printf("%i",x_17); /* printf_va_56 */ + scanf("%ld",& x_17); /* scanf_va_55 */ + printf("%ld",x_17); /* printf_va_55 */ + scanf("%li",& x_17); /* scanf_va_56 */ + printf("%li",x_17); /* printf_va_56 */ } { uint_fast16_t x_18; - scanf("%o",& x_18); /* scanf_va_57 */ - printf("%o",x_18); /* printf_va_57 */ - scanf("%u",& x_18); /* scanf_va_58 */ - printf("%u",x_18); /* printf_va_58 */ - scanf("%x",& x_18); /* scanf_va_59 */ - printf("%x",x_18); /* printf_va_59 */ - scanf("%x",& x_18); /* scanf_va_60 */ - printf("%X",x_18); /* printf_va_60 */ + scanf("%lo",& x_18); /* scanf_va_57 */ + printf("%lo",x_18); /* printf_va_57 */ + scanf("%lu",& x_18); /* scanf_va_58 */ + printf("%lu",x_18); /* printf_va_58 */ + scanf("%lx",& x_18); /* scanf_va_59 */ + printf("%lx",x_18); /* printf_va_59 */ + scanf("%lx",& x_18); /* scanf_va_60 */ + printf("%lX",x_18); /* printf_va_60 */ } { int_fast32_t x_19; - scanf("%d",& x_19); /* scanf_va_61 */ - printf("%d",x_19); /* printf_va_61 */ - scanf("%i",& x_19); /* scanf_va_62 */ - printf("%i",x_19); /* printf_va_62 */ + scanf("%ld",& x_19); /* scanf_va_61 */ + printf("%ld",x_19); /* printf_va_61 */ + scanf("%li",& x_19); /* scanf_va_62 */ + printf("%li",x_19); /* printf_va_62 */ } { uint_fast32_t x_20; - scanf("%o",& x_20); /* scanf_va_63 */ - printf("%o",x_20); /* printf_va_63 */ - scanf("%u",& x_20); /* scanf_va_64 */ - printf("%u",x_20); /* printf_va_64 */ - scanf("%x",& x_20); /* scanf_va_65 */ - printf("%x",x_20); /* printf_va_65 */ - scanf("%x",& x_20); /* scanf_va_66 */ - printf("%X",x_20); /* printf_va_66 */ + scanf("%lo",& x_20); /* scanf_va_63 */ + printf("%lo",x_20); /* printf_va_63 */ + scanf("%lu",& x_20); /* scanf_va_64 */ + printf("%lu",x_20); /* printf_va_64 */ + scanf("%lx",& x_20); /* scanf_va_65 */ + printf("%lx",x_20); /* printf_va_65 */ + scanf("%lx",& x_20); /* scanf_va_66 */ + printf("%lX",x_20); /* printf_va_66 */ } { int_fast64_t x_21; diff --git a/tests/misc/custom_machdep.ml b/tests/misc/custom_machdep.ml index 353ed1a7e93..974683a3127 100644 --- a/tests/misc/custom_machdep.ml +++ b/tests/misc/custom_machdep.ml @@ -19,6 +19,14 @@ let mach = ssize_t = "long"; intptr_t = "long"; uintptr_t = "unsigned long"; + int_fast8_t = "signed char"; + int_fast16_t = "long"; + int_fast32_t = "long"; + int_fast64_t = "long long"; + uint_fast8_t = "unsigned char"; + uint_fast16_t = "unsigned long"; + uint_fast32_t = "unsigned long"; + uint_fast64_t = "unsigned long long"; wint_t = "int"; wchar_t = "int"; ptrdiff_t = "int"; diff --git a/tests/misc/custom_machdep.yaml b/tests/misc/custom_machdep.yaml index c80687f42c7..1fe7b404a43 100644 --- a/tests/misc/custom_machdep.yaml +++ b/tests/misc/custom_machdep.yaml @@ -17,6 +17,14 @@ little_endian: true ptrdiff_t: int intptr_t: long uintptr_t: unsigned long +int_fast8_t: signed char +int_fast16_t: long +int_fast32_t: long +int_fast64_t: long long +uint_fast8_t: unsigned char +uint_fast16_t: unsigned long +uint_fast32_t: unsigned long +uint_fast64_t: unsigned long long wint_t: int size_t: unsigned long sizeof_double: 8 diff --git a/tests/syntax/machdep_char_unsigned.ml b/tests/syntax/machdep_char_unsigned.ml index fd26eedff20..66f8c989e2a 100644 --- a/tests/syntax/machdep_char_unsigned.ml +++ b/tests/syntax/machdep_char_unsigned.ml @@ -32,6 +32,14 @@ let md = { wchar_t = "int"; intptr_t = "int"; uintptr_t = "unsigned int"; + int_fast8_t = "signed char"; + int_fast16_t = "long"; + int_fast32_t = "long"; + int_fast64_t = "long"; + uint_fast8_t = "unsigned char"; + uint_fast16_t = "unsigned long"; + uint_fast32_t = "unsigned long"; + uint_fast64_t = "usigned long"; ptrdiff_t = "int"; wint_t = "long"; sig_atomic_t = "int"; -- GitLab