diff options
author | Jacob Moody <moody@posixcafe.org> | 2023-03-17 22:08:14 +0000 |
---|---|---|
committer | Jacob Moody <moody@posixcafe.org> | 2023-03-17 22:08:14 +0000 |
commit | 613fd6b4294ad3277a91c9a2e58b2b2d4f22ab1c (patch) | |
tree | b33eea1f59937ef3122f28f306703d0f0ae844b5 | |
parent | 5664fb3540ae0dccec628720574520122193ab1b (diff) |
cc: fix suicide with undefined function arguments
_Noreturn change introduced a check on the type
for OFUNC. This will be nil in the event that a
symbol given as a function argument is undefined.
-rw-r--r-- | sys/src/cmd/cc/pgen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/cc/pgen.c b/sys/src/cmd/cc/pgen.c index 2b382bda1..525e196a0 100644 --- a/sys/src/cmd/cc/pgen.c +++ b/sys/src/cmd/cc/pgen.c @@ -168,7 +168,7 @@ loop: case OFUNC: complex(n); cgen(n, Z); - if((n->type->garb & GNORET) == 0) + if(n->type == nil || (n->type->garb & GNORET) == 0) break; canreach = 0; |