From 5aadfd59a8d1ea4f31b7c574940b40b6c63ee961 Mon Sep 17 00:00:00 2001 From: johanknol Date: Wed, 25 Jul 2001 18:14:17 +0000 Subject: [PATCH] no need to promote 0xff00u to long git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1102 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCval.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SDCCval.c b/src/SDCCval.c index c197f817..51214a55 100644 --- a/src/SDCCval.c +++ b/src/SDCCval.c @@ -310,8 +310,9 @@ constVal (char *s) sval = atol (s); - if (SPEC_LONG (val->type) || sval > 32768) - { + if (SPEC_LONG (val->type) || + (SPEC_USIGN(val->type) && sval>0xffff) || + (!SPEC_USIGN(val->type) && ((long)sval>32767 || (long)sval<-32768)) { if (SPEC_USIGN (val->type)) SPEC_CVAL (val->type).v_ulong = sval; else -- 2.30.2