From bdb0b550f73b688d8bb5bd97f54a26235ee8fc82 Mon Sep 17 00:00:00 2001 From: eck Date: Tue, 12 Dec 1989 14:59:59 +0000 Subject: [PATCH] U-flag was not handled properly --- lang/cem/cemcom.ansi/LLlex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/cem/cemcom.ansi/LLlex.c b/lang/cem/cemcom.ansi/LLlex.c index 12f08f47b..128dd74de 100644 --- a/lang/cem/cemcom.ansi/LLlex.c +++ b/lang/cem/cemcom.ansi/LLlex.c @@ -725,9 +725,9 @@ struct token *ptok; *cp = '\0'; ptok->tk_fund = LNGDBL; } else { + if (*cp) malformed++; ptok->tk_fund = DOUBLE; } - if (*cp) malformed++; if (malformed) { lexerror("malformed floating constant"); ptok->tk_fval = Salloc("0.0", (unsigned) 4); @@ -799,7 +799,7 @@ struct token *ptok; fund = ULONG; } else if ((val & full_mask[(int)int_size]) == val) { if (val >= 0 && val <= max_int) fund = INT; - else fund = (base == 10 ? LONG : UNSIGNED); + else fund = (((base == 10) && !uns_flg) ? LONG : UNSIGNED); } else if((val & full_mask[(int)long_size]) == val) { if (val > 0) fund = LONG; else fund = ULONG; -- 2.34.1