aboutsummaryrefslogtreecommitdiffhomepage
path: root/c
diff options
context:
space:
mode:
Diffstat (limited to 'c')
-rw-r--r--c/c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/c/c.c b/c/c.c
index d3f97ec..f0b4c1e 100644
--- a/c/c.c
+++ b/c/c.c
@@ -155,7 +155,7 @@ isexprtok(struct comp *cm)
struct token tk;
if (peek(cm, &tk) == TKIDENT) {
struct decl *decl = finddecl(cm, tk.name);
- return decl && decl->scls != SCTYPEDEF;
+ return !decl || decl->scls != SCTYPEDEF;
} else {
static const bool tks[] = {
#define tk(x) [x] = 1
@@ -4213,7 +4213,7 @@ stmt(struct comp *cm, struct function *fn)
stmtterm(cm);
break;
case TKWreturn:
- lex(cm, NULL);
+ lex(cm, &tk);
if (isexprtok(cm)) {
ex = commaexpr(cm);
if (fn->retty.t == TYVOID) {