shithub: scc

Download patch

ref: b0b817261fb05f20bbeb9ab91586a2569dd7bd85
parent: 709d86f7eb083c471a8a4757c7158e0462220a13
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Mar 6 08:40:31 EST 2017

[cc1] Use u variable in emitconst()

This variable was used to avoid type punning in emitconst(),
but due to a error at the end the type punning was done.

--- a/cc1/code.c
+++ b/cc1/code.c
@@ -224,7 +224,7 @@
 		fprintf(outfp,
 		        "#%c%llX",
 		        np->type->letter,
-		        (long long) sym->u.i & ones(tp->size));
+		        (long long) u & ones(tp->size));
 		break;
 	default:
 		abort();