scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit faeb157307bc3ff25fa560b5c0a2c62494aa3d55
parent 7f67b52547e174f08e25f66932e29502be2c5074
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 20 May 2016 15:23:57 +0200

[cc1] Do not recover in incorrect return type

In this case we don't have to recover the error,
we can continue with the parsing without problems
here.

Diffstat:
cc1/stmt.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cc1/stmt.c b/cc1/stmt.c @@ -158,7 +158,7 @@ Return(Symbol *lbreak, Symbol *lcont, Switch *lswitch) if (tp == voidtype) warn("function returning void returns a value"); else if ((np = convert(np, tp, 0)) == NULL) - error("incorrect type in return"); + errorp("incorrect type in return"); } emit(ORET, NULL); emit(OEXPR, np);