From 48c0f71deb8dceb7d74064d2bc769dcd57b645c7 Mon Sep 17 00:00:00 2001 From: tg Date: Thu, 16 Jan 2014 13:59:12 +0000 Subject: [PATCH] =?UTF-8?q?remove=20(#ifdef=20DEBUG)=20obsolete=20integer?= =?UTF-8?q?=20wraparound=20runtime=20test=20(maybe=20do=20something=20for?= =?UTF-8?q?=20unsigneds=20later=E2=80=A6=20but=20then,=20it=E2=80=99s=20th?= =?UTF-8?q?e=20standard,=20and=20you=E2=80=99d=20notice=20very=20quickly,?= =?UTF-8?q?=20and=20check.t=20would)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.c | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/main.c b/main.c index 44ae7dd..18cdc6b 100644 --- a/main.c +++ b/main.c @@ -34,7 +34,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/main.c,v 1.278 2014/01/16 13:54:45 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/main.c,v 1.279 2014/01/16 13:59:12 tg Exp $"); extern char **environ; @@ -422,44 +422,6 @@ main_init(int argc, const char *argv[], Source **sp, struct block **lp) return (1); } -#if defined(DEBUG) && !defined(MKSH_LEGACY_MODE) - /* test wraparound of arithmetic types */ - { - volatile long xl; - volatile unsigned long xul; - volatile int xi; - volatile unsigned int xui; - volatile mksh_ari_t xa; - volatile mksh_uari_t xua, xua2; - volatile uint8_t xc; - - xa = 2147483647; - xua = 2147483647; - ++xa; - ++xua; - xua2 = xa; - xl = xa; - xul = xua; - xa = 0; - xua = 0; - --xa; - --xua; - xi = xa; - xui = xua; - xa = -1; - xua = xa; - ++xa; - ++xua; - xc = 0; - --xc; - if ((xua2 != 2147483648UL) || - (xl != (-2147483647L-1)) || (xul != 2147483648UL) || - (xi != -1) || (xui != 4294967295U) || - (xa != 0) || (xua != 0) || (xc != 255)) - errorf("integer wraparound test failed"); - } -#endif - /* process this later only, default to off (hysterical raisins) */ utf_flag = UTFMODE; UTFMODE = 0;