From f610d683ab451709a42cc54de64eb1d693159f57 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 12 Aug 2008 11:38:08 +0000 Subject: [PATCH] ignore -fPIC, one more missing skip_typeref [r21119] --- ast.c | 3 ++- main.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ast.c b/ast.c index b3ef16c..7bac0da 100644 --- a/ast.c +++ b/ast.c @@ -1468,7 +1468,8 @@ static bool is_object_with_linker_constant_address(const expression_t *expressio return is_address_constant(expression->unary.value); case EXPR_SELECT: { - if(is_type_pointer(expression->select.compound->base.type)) { + type_t *base_type = skip_typeref(expression->select.compound->base.type); + if(is_type_pointer(base_type)) { /* it's a -> */ return is_address_constant(expression->select.compound); } else { diff --git a/main.c b/main.c index 53d85cc..d1ddfc0 100644 --- a/main.c +++ b/main.c @@ -628,6 +628,7 @@ int main(int argc, char **argv) || strcmp(opt, "unroll-loops") == 0 || strcmp(opt, "expensive-optimizations") == 0 || strcmp(opt, "no-common") == 0 + || strcmp(opt, "PIC") == 0 || strncmp(opt, "align-loops=", sizeof("align-loops=")-1) == 0 || strncmp(opt, "align-jumps=", sizeof("align-jumps=")-1) == 0 || strncmp(opt, "align-functions=", sizeof("align-functions=")-1) == 0) { -- 2.20.1