mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
cc: dont' try compiling invalid code
When we have errors in the code, passing it on to the backend just generates cryptic or incorrect errors, and in some case, crashes as we try to process trees with missing labels, or which are malformed in other ways. Instead, bail out of codgen() and don't even try.
This commit is contained in:
parent
7d13427ccf
commit
0518041867
1 changed files with 5 additions and 0 deletions
|
@ -11,6 +11,11 @@ codgen(Node *n, Node *nn)
|
|||
maxargsafe = 0;
|
||||
hasdoubled = 0;
|
||||
|
||||
/*
|
||||
* no point in giving invalid code to the backend.
|
||||
*/
|
||||
if(nerrors != 0)
|
||||
return;
|
||||
/*
|
||||
* isolate name
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue