extract_int64() must not handle negation operation (was doing it incorrectly for INT64_MIN!)
authorMario de Sousa <msousa@fe.up.pt>
Wed, 13 Jun 2012 14:21:30 +0100
changeset 591 76bad7199896
parent 590 649667749171
child 592 99a284cec1f2
extract_int64() must not handle negation operation (was doing it incorrectly for INT64_MIN!)
absyntax_utils/absyntax_utils.cc
--- a/absyntax_utils/absyntax_utils.cc	Wed Jun 13 14:07:41 2012 +0100
+++ b/absyntax_utils/absyntax_utils.cc	Wed Jun 13 14:21:30 2012 +0100
@@ -126,11 +126,7 @@
   char *endptr;
   int64_t ret;
 
-  if ((neg_integer = dynamic_cast<neg_integer_c *>(sym)) != NULL)
-    return - extract_int64_value(neg_integer->exp, overflow);
-
   if ((integer = dynamic_cast<integer_c *>(sym)) == NULL) ERROR;
-
   for(unsigned int i = 0; i < strlen(integer->value); i++)
     if (integer->value[i] != '_')  str += integer->value[i];
 
@@ -152,7 +148,6 @@
   uint64_t ret;
   
   if ((integer = dynamic_cast<integer_c *>(sym)) == NULL) ERROR;
-
   for(unsigned int i = 0; i < strlen(integer->value); i++)
     if (integer->value[i] != '_')  str += integer->value[i];