commit b2e2403705ee71f141db8b9a4bac947ce3116f1d
parent 60276b9715bb154938ceaa813300509638de1835
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Mon, 1 Aug 2016 16:05:01 +0200
[cc1] Avoid recovery in elseclause
We do not want to recover in any cpp function, because we are out
of synchronization at that moment.
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/cc1/cpp.c b/cc1/cpp.c
@@ -652,8 +652,10 @@ elseclause(void)
{
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;