From: jesusc Date: Thu, 14 Aug 2003 05:19:07 +0000 (+0000) Subject: MSVC gives an error if declaration is after statements X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=46cb5ab6460b620d06718eed3255039c3c1a2cb3;p=fw%2Fsdcc MSVC gives an error if declaration is after statements git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2827 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCval.c b/src/SDCCval.c index 5d95986e..30b9446e 100644 --- a/src/SDCCval.c +++ b/src/SDCCval.c @@ -1475,6 +1475,7 @@ value * valCastLiteral (sym_link * dtype, double fval) { value *val; + TYPE_UDWORD l = (TYPE_UDWORD)fval; if (!dtype) return NULL; @@ -1482,7 +1483,6 @@ valCastLiteral (sym_link * dtype, double fval) val = newValue (); val->etype = getSpec (val->type = copyLinkChain (dtype)); SPEC_SCLS (val->etype) = S_LITERAL; - TYPE_UDWORD l = (TYPE_UDWORD)fval; /* if it is not a specifier then we can assume that */ /* it will be an unsigned long */