[hackers] [scc] [cc1] Fix integer types ranges || Quentin Rameau

From: <git_AT_suckless.org>
Date: Tue, 21 Mar 2017 12:08:57 +0100 (CET)

commit 56fa97c0542ea683fdc3c88549e6e1690bfe0878
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Sun Mar 19 11:27:00 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Tue Mar 21 12:07:54 2017 +0100

    [cc1] Fix integer types ranges

diff --git a/cc1/types.c b/cc1/types.c
index 50e1fcb..ff42d83 100644
--- a/cc1/types.c
+++ b/cc1/types.c
_AT_@ -24,37 +24,37 @@ static struct limits limits[][4] = {
         {
                 { /* 0 = unsigned 1 byte */
                         .min.i = 0,
- .max.i = 255
+ .max.i = 0xff
                 },
                 { /* 1 = unsigned 2 bytes */
                         .min.i = 0,
- .max.i = 65535u
+ .max.i = 0xffff
                 },
                 { /* 2 = unsigned 4 bytes */
                         .min.i = 0,
- .max.i = 4294967295u
+ .max.i = 0xffffffff
                 },
                 { /* 3 = unsigned 8 bytes */
                         .min.i = 0,
- .max.i = 18446744073709551615u
+ .max.i = 0xffffffffffffffff
                 }
         },
         {
                 { /* 0 = signed 1 byte */
- .min.i = -127,
- .max.i = 127
+ .min.i = -0x7f-1,
+ .max.i = 0x7f
                 },
                 { /* 1 = signed 2 byte */
- .min.i = -32767,
- .max.i = 32767
+ .min.i = -0x7fff-1,
+ .max.i = 0x7fff
                 },
                 { /* 2 = signed 4 byte */
- .min.i = -2147483647L,
- .max.i = 2147483647L
+ .min.i = -0x7fffffff-1,
+ .max.i = 0x7fffffff
                 },
                 { /* 3 = signed 8 byte */
- .min.i = -9223372036854775807LL,
- .max.i = 9223372036854775807LL,
+ .min.i = -0x7fffffffffffffff-1,
+ .max.i = 0x7fffffffffffffff,
                 }
         },
         {
Received on Tue Mar 21 2017 - 12:08:57 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 21 2017 - 12:12:36 CET