scc

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

commit e09ad0442d5af5784989e81a81b390bed5295d13
parent 804ee8287281ddb95bf676825021f944a6fbe398
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 29 Jun 2012 10:59:04 +0200

Fixed bug testing function declaration

In the case of declaration without type we will have a null pointer indirection.

Diffstat:
decl.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/decl.c b/decl.c @@ -130,8 +130,7 @@ static void listdcl(register struct ctype *cp) warning_error(user_opt.implicit_int, "type defaults to 'int' in declaration of '%s'", yytext); - } - if (tp->op == FTN && yytoken == '{') { + } else if (tp->op == FTN && yytoken == '{') { compound(); return; }