From 2ac58d2f2ae483dd746bd9a3c70482c5cb654d0e Mon Sep 17 00:00:00 2001 From: MaartenBrock Date: Sat, 9 Jun 2007 13:20:47 +0000 Subject: [PATCH] * src/SDCCsymt.c (computeType): added optimization for 'cond ? true : false' git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4842 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 1 + src/SDCCsymt.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 812eccc8..39b149e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ can also be static, fixes bug 1733438 * src/SDCCsymt.c (checkSClass): static local vars in reentrant funcs can have absolute address too + (computeType): added optimization for 'cond ? true : false' * support/regression/tests/absolute.c: added test for static absolute var 2007-06-08 Raphael Neider diff --git a/src/SDCCsymt.c b/src/SDCCsymt.c index 0870e7e4..8e0f402f 100644 --- a/src/SDCCsymt.c +++ b/src/SDCCsymt.c @@ -1904,6 +1904,17 @@ computeType (sym_link * type1, sym_link * type2, switch (resultType) { + case RESULT_TYPE_IFX: + if (TARGET_IS_HC08) + break; + //fallthrough + case RESULT_TYPE_BIT: + if (op == ':') + { + SPEC_NOUN (reType) = V_BIT; + return rType; + } + break; case RESULT_TYPE_CHAR: if (IS_BITVAR (reType)) { -- 2.30.2