From d88a083fc76e08d3ae1ef4e34d919c80d44e1118 Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Fri, 31 Oct 2003 15:45:40 +0000 Subject: [PATCH] src/SDCCast.c (decorateType): fixed bug #832664 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2975 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 1 + src/SDCCast.c | 11 +++-------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5214928f..98bc5b15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2003-10-31 Bernhard Held * src/SDCCmain.c (linkEdit): "fixed" bug #833605 + * src/SDCCast.c (decorateType): fixed bug #832664 2003-10-31 Borut Razem diff --git a/src/SDCCast.c b/src/SDCCast.c index c0d2787a..21372879 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -3062,14 +3062,9 @@ decorateType (ast * tree) } } LRVAL (tree) = RRVAL (tree) = 1; - if (IS_LITERAL (LTYPE (tree)) && !IS_LITERAL (RTYPE (tree))) - { - COPYTYPE (TTYPE (tree), TETYPE (tree), RTYPE (tree)); - } - else - { - COPYTYPE (TTYPE (tree), TETYPE (tree), LTYPE (tree)); - } + TTYPE (tree) = TETYPE (tree) = copyLinkChain (LTYPE (tree)); + if (IS_LITERAL (TTYPE (tree))) + SPEC_SCLS (TTYPE (tree)) &= ~S_LITERAL; return tree; /*------------------------------------------------------------------*/ -- 2.47.2