From 1e9da87a99d46ff97a19654704edb1d4e01f193b Mon Sep 17 00:00:00 2001 From: Yang Chen Date: Mon, 1 Aug 2011 16:25:48 -0600 Subject: [PATCH] Correct fix to the `U` suffix when --ccomp is passed I don't know what I was thinking about yesterday... --- src/Constant.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Constant.cpp b/src/Constant.cpp index 9e1a224ec..409c4f0cc 100644 --- a/src/Constant.cpp +++ b/src/Constant.cpp @@ -294,10 +294,10 @@ GenerateRandomConstant(const Type* type) break; default: oss << num; break; } - if (CGOptions::ccomp()) - v = oss.str(); - else + if (CGOptions::ccomp()) v = oss.str() + (type->is_signed() ? "" : "U"); + else + v = oss.str() + (type->is_signed() ? "L" : "UL"); } else { switch (st) { case eVoid: v = "/* void */"; break;