shithub: scc

Download patch

ref: 0f0cbf03f9dcbee4dba981e29a7ea43d96e648e7
parent: 5d10713e968041bbb85b19b5dc673d33b7d1ef7d
author: Roberto E. Vargas Caballero <[email protected]>
date: Mon Sep 7 19:19:24 EDT 2015

Fix cast()

lp was not initialized in any place.

--- a/cc1/expr.c
+++ b/cc1/expr.c
@@ -694,7 +694,8 @@
 			error("cast specify a function type");
 		default:
 			expect(')');
-			if ((rp = convert(cast(),  tp, 1)) == NULL)
+			lp = cast();
+			if ((rp = convert(lp,  tp, 1)) == NULL)
 				error("bad type convertion requested");
 			rp->lvalue = lp->lvalue;
 		}