Treat expressions with error type as lvalues. There was a parse error before, which...
authorChristoph Mallon <christoph.mallon@gmx.de>
Thu, 2 Oct 2008 18:39:58 +0000 (18:39 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 2 Oct 2008 18:39:58 +0000 (18:39 +0000)
[r22419]

parser.c

index 8b277e2..461c62c 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -7476,7 +7476,10 @@ static bool is_lvalue(const expression_t *expression)
                return true;
 
        default:
-               return false;
+               /* Claim it is an lvalue, if the type is invalid.  There was a parse
+                * error before, which maybe prevented properly recognizing it as
+                * lvalue. */
+               return !is_type_valid(skip_typeref(expression->base.type));
        }
 }