From 2e638fccd81e96ce09841adc4b295b5ce694ea73 Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Sat, 6 Nov 2021 12:20:05 -0700 Subject: [PATCH] C char type: decide signedness of char based on CHAR_MIN Previously had char fixed to signed char, this is not useful on ARM as it does not align with the host type. Instead, decide at runtime (or probably compile time) if char is signed or not. --- ragel/common.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ragel/common.cpp b/ragel/common.cpp index 8e9f8ed0..55875c06 100644 --- a/ragel/common.cpp +++ b/ragel/common.cpp @@ -27,14 +27,14 @@ HostType hostTypesC[] = { - { "char", 0, "char", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, sizeof(char) }, - { "unsigned", "char", "uchar", false, true, false, 0, 0, 0, UCHAR_MAX, sizeof(unsigned char) }, - { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, sizeof(short) }, - { "unsigned", "short", "ushort", false, true, false, 0, 0, 0, USHRT_MAX, sizeof(unsigned short) }, - { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, sizeof(int) }, - { "unsigned", "int", "uint", false, true, false, 0, 0, 0, UINT_MAX, sizeof(unsigned int) }, - { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, 0, 0, sizeof(long) }, - { "unsigned", "long", "ulong", false, true, false, 0, 0, 0, ULONG_MAX, sizeof(unsigned long) } + { "char", 0, "char", (CHAR_MIN != 0), true, false, SCHAR_MIN, SCHAR_MAX, 0, UCHAR_MAX, sizeof(char) }, + { "unsigned", "char", "uchar", false, true, false, 0, 0, 0, UCHAR_MAX, sizeof(unsigned char) }, + { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, sizeof(short) }, + { "unsigned", "short", "ushort", false, true, false, 0, 0, 0, USHRT_MAX, sizeof(unsigned short) }, + { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, sizeof(int) }, + { "unsigned", "int", "uint", false, true, false, 0, 0, 0, UINT_MAX, sizeof(unsigned int) }, + { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, 0, 0, sizeof(long) }, + { "unsigned", "long", "ulong", false, true, false, 0, 0, 0, ULONG_MAX, sizeof(unsigned long) } }; #define S8BIT_MIN -128 -- 2.33.1 >space:mode:
authorMark H Weaver <mhw@netris.org>2017-08-25 23:52:14 -0400
committerMark H Weaver <mhw@netris.org>2017-08-25 23:52:14 -0400
commitcd2247cccdf5266d21fcf36f04b60f6171148f0f (patch)
treedc536e4c92f25860151216fac6068ab3850a3245
parent35131babc1363852d1c0f393b848f85ae1aec0c8 (diff)
downloadguix-cd2247cccdf5266d21fcf36f04b60f6171148f0f.tar.gz
guix-cd2247cccdf5266d21fcf36f04b60f6171148f0f.zip
gnu: linux-libre@4.4: Update to 4.4.84.
* gnu/packages/linux.scm (linux-libre-4.4): Update to 4.4.84.
Diffstat
-rw-r--r--gnu/packages/linux.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 6c70328eba..3cdcc51c00 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm