ref: c91781cb539c8c8d9bf20a37671f3451e24eb8ea
parent: 79f242a1b486146c944786b26b8b9a82a18670e2
author: Quentin Rameau <[email protected]>
date: Tue Jul 12 14:45:33 EDT 2016
[cc2-qbe] fix eval call with NULL in oreturn Actually pass the resulting token to eval instead of trying to parse it again an having a null pointer.
--- a/cc2/parser.c
+++ b/cc2/parser.c
@@ -329,9 +329,8 @@
{
Node *np = newnode(u.op);
- token = strtok(NULL, "\t\n");
- if (token)
- eval(strtok(NULL, "\t\n"));
+ if (token = strtok(NULL, "\t\n"))
+ eval(token);
if (!empty())
np->left = pop();
push(np);