summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2021-11-06 12:15:36 -0700
committerAdrian Thurston <thurston@colm.net>2021-11-06 12:15:36 -0700
commit6743c012830700217a7f406418a58e814cf89ee7 (patch)
treeb62fd6f58d79ad8001c65ea13d0f5887ca125cc0
parentd9ec5ca9cdc5015c93c11f195db49c511a71f298 (diff)
downloadragel-6743c012830700217a7f406418a58e814cf89ee7.tar.gz
C codegen: use the 'signed' prefix when specifying the size of the signed types
-rw-r--r--src/common.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common.cc b/src/common.cc
index eafaab68..027b945c 100644
--- a/src/common.cc
+++ b/src/common.cc
@@ -43,16 +43,16 @@ const char *defaultOutFnC( const char *inputFileName )
HostType hostTypesC[] =
{
{ "char", 0, "char", (CHAR_MIN != 0), true, false, SCHAR_MIN, SCHAR_MAX, 0, UCHAR_MAX, sizeof(char) },
- { "signed", "char", "char", true, true, false, SCHAR_MIN, SCHAR_MAX, 0, 0, sizeof(char) },
+ { "signed", "char", "char", true, true, false, SCHAR_MIN, SCHAR_MAX, 0, 0, sizeof(signed 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) },
- { "signed", "short", "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, sizeof(short) },
+ { "signed", "short", "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, sizeof(signed 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) },
- { "signed", "int", "int", true, true, false, INT_MIN, INT_MAX, 0, 0, sizeof(int) },
+ { "signed", "int", "int", true, true, false, INT_MIN, INT_MAX, 0, 0, sizeof(signed 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) },
- { "signed", "long", "long", true, true, false, LONG_MIN, LONG_MAX, 0, 0, sizeof(long) },
+ { "signed", "long", "long", true, true, false, LONG_MIN, LONG_MAX, 0, 0, sizeof(signed long) },
{ "unsigned", "long", "ulong", false, true, false, 0, 0, 0, ULONG_MAX, sizeof(unsigned long) },
};