Prevent stray error messages by pretending invalid references are address constants.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sun, 14 Sep 2008 17:50:19 +0000 (17:50 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 14 Sep 2008 17:50:19 +0000 (17:50 +0000)
[r21948]

ast.c

diff --git a/ast.c b/ast.c
index 060aa6c..a9f8554 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1634,6 +1634,9 @@ bool is_address_constant(const expression_t *expression)
                if(is_type_array(type)) {
                        return is_object_with_linker_constant_address(expression);
                }
+               /* Prevent stray errors */
+               if (!is_type_valid(type))
+                       return true;
                return false;
        }