From: maartenbrock Date: Tue, 22 Feb 2005 16:06:03 +0000 (+0000) Subject: * src/SDCCast.c (decorateType): fixed bug 1124787 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=de704f5b1dc658f63cd0280690aecba9ca72bd11;p=fw%2Fsdcc * src/SDCCast.c (decorateType): fixed bug 1124787 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3684 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 6062189a..bfbbc86a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-02-22 Maarten Brock + + * src/SDCCast.c (decorateType): fixed bug 1124787 + 2004-02-20 Hubert Sack committed by Frieder Ferlemann diff --git a/src/SDCCast.c b/src/SDCCast.c index 84a6c7f1..f872f88c 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -3933,7 +3933,8 @@ decorateType (ast * tree, RESULT_TYPE resultType) case ':': /* if they don't match we have a problem */ - if (compareType (LTYPE (tree), RTYPE (tree)) == 0) + if ((compareType (LTYPE (tree), RTYPE (tree)) == 0) && + (compareType (RTYPE (tree), LTYPE (tree)) == 0)) { werror (E_TYPE_MISMATCH, "conditional operator", " "); goto errorTreeReturn;