summaryrefslogtreecommitdiff
path: root/src/parsers/cst
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-07 18:13:31 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-07 18:13:31 +0300
commit736c29dbf42250e8e4d1aab7953ddb57742ba67d (patch)
tree93065dbea1eddfadd502acd5c74163301f2a32a3 /src/parsers/cst
parent9e2788dc573872d3096913f041a068ba3428b882 (diff)
downloadparanucker-736c29dbf42250e8e4d1aab7953ddb57742ba67d.tar.gz
paranucker-736c29dbf42250e8e4d1aab7953ddb57742ba67d.tar.bz2
paranucker-736c29dbf42250e8e4d1aab7953ddb57742ba67d.tar.xz
paranucker-736c29dbf42250e8e4d1aab7953ddb57742ba67d.zip
Fix crash in parsing INTEGER_CST.
Diffstat (limited to 'src/parsers/cst')
-rw-r--r--src/parsers/cst/integer_cst.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parsers/cst/integer_cst.cpp b/src/parsers/cst/integer_cst.cpp
index b5b3686..ebdfe7a 100644
--- a/src/parsers/cst/integer_cst.cpp
+++ b/src/parsers/cst/integer_cst.cpp
@@ -34,6 +34,11 @@ namespace Generic
void parseIntegerCstNode(IntegerCstNode *node)
{
fillType(node);
+ if (!tree_fits_shwi_p(node->gccNode))
+ {
+ node->noLabel = true;
+ return;
+ }
if (tree_int_cst_sgn(node->gccNode) < 0)
{
node->label = "-";