#559 Errant fall-through in switch statement in SDCCast.c

closed-rejected
Bernhard Held
5
2003-08-03
2003-08-02
Anonymous
No

One case in the switch statement in SDCCast.c may
fall-through
leading to a segfault in the compiler. A patch to fix
the problem
is included below.

-Carl

Carl Worth <cworth@isi.edu>

Index: src/SDCCast.c

RCS file: /cvsroot/sdcc/sdcc/src/SDCCast.c,v
retrieving revision 1.182
diff -u -r1.182 SDCCast.c
--- src/SDCCast.c 20 May 2003 06:44:43 -0000
1.182
+++ src/SDCCast.c 2 Aug 2003 01:22:53 -0000
@@ -1279,6 +1279,7 @@
if (constExprTree(cexpr->left) &&
constExprTree(cexpr->right)) {
return TRUE;
}
+ return FALSE;
case EX_OPERAND:
return IS_CONSTANT(operandType(cexpr->opval.oprnd));
}

Discussion

  • Logged In: NO

    Ugh... this bug tracker scrambled my patch, and won't let me add
    a new attachment. I'll file a new bug.

    -Carl

     
  • Bernhard Held
    Bernhard Held
    2003-08-03

    • assigned_to: nobody --> bernhardheld
    • status: open --> closed-rejected
     
  • Bernhard Held
    Bernhard Held
    2003-08-03

    Logged In: YES
    user_id=203539

    See 781827.