shithub: scc

Download patch

ref: 3b91cba7aee04f37a8ba3270bd1cbd28f4198c24
parent: e4273bdbf5da7b420bdde73522e4b58c9c6c3563
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Aug 1 12:05:01 EDT 2016

[cc1] Avoid recovery in elseclause

We do not want to recover in any cpp function, because we are out
of synchronization at that moment.

--- a/cc1/cpp.c
+++ b/cc1/cpp.c
@@ -652,8 +652,10 @@
 {
 	int status;
 
-	if (cppctx == 0)
-		error("#else without #ifdef/ifndef");
+	if (cppctx == 0) {
+		cpperror("#else without #ifdef/ifndef");
+		return;
+	}
 
 	status = (ifstatus[cppctx-1] ^= 1);
 	cppoff += (status) ? -1 : 1;