shithub: scc

Download patch

ref: cf88732f55aca5aff3adb04b136c7274a51ec772
parent: daf6c273125ec2b9c6776a0f715e0b5449fc997f
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Jun 20 13:40:08 EDT 2016

[cc1] Fix parsing of long double

An anciant version of the token encoding had LLONG equal to 2*LONG,
but this is not true since long time ago. The problem in this complex
type check is that double is equal to long float.

--- a/cc1/types.c
+++ b/cc1/types.c
@@ -145,7 +145,10 @@
 	case DOUBLE:
 		if (size == LLONG)
 			goto invalid_type;
-		size += LONG;
+		if (size == LONG)
+			size = LLONG;
+		else
+			size = LONG;
 		goto floating;
 	case FLOAT:
 		if (size == LLONG)