From: chrbr Date: Tue, 12 Jan 2016 15:01:12 +0000 (+0000) Subject: PR target/69180 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b9cb7a6793dc498715ff566650a74f81d2a27e91;p=thirdparty%2Fgcc.git PR target/69180 * config/arm/arm-c.c (arm_pragma_target_parse): Set NODE_CONDITIONAL for __ARM_NEON_FP, __ARM_FP, _ARM_FEATURE_LDREX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232276 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7af68e6e2dbc..578717c38229 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-01-12 Christian Bruel + + PR target/69180 + * config/arm/arm-c.c (arm_pragma_target_parse): Set NODE_CONDITIONAL + for __ARM_NEON_FP, __ARM_FP, _ARM_FEATURE_LDREX. + 2016-01-12 Jakub Jelinek PR target/69198 diff --git a/gcc/config/arm/arm-c.c b/gcc/config/arm/arm-c.c index a0195ce9c6d5..5810608873e0 100644 --- a/gcc/config/arm/arm-c.c +++ b/gcc/config/arm/arm-c.c @@ -23,6 +23,7 @@ #include "c-family/c-common.h" #include "tm_p.h" #include "c-family/c-pragma.h" +#include "stringpool.h" /* Output C specific EABI object attributes. These can not be done in arm.c because they require information from the C frontend. */ @@ -245,8 +246,18 @@ arm_pragma_target_parse (tree args, tree pop_target) /* Update macros. */ gcc_assert (cur_opt->x_target_flags == target_flags); - /* This one can be redefined by the pragma without warning. */ - cpp_undef (parse_in, "__ARM_FP"); + + /* Don't warn for macros that have context sensitive values depending on + other attributes. + See warn_of_redefinition, Reset after cpp_create_definition. */ + tree acond_macro = get_identifier ("__ARM_NEON_FP"); + C_CPP_HASHNODE (acond_macro)->flags |= NODE_CONDITIONAL ; + + acond_macro = get_identifier ("__ARM_FP"); + C_CPP_HASHNODE (acond_macro)->flags |= NODE_CONDITIONAL; + + acond_macro = get_identifier ("__ARM_FEATURE_LDREX"); + C_CPP_HASHNODE (acond_macro)->flags |= NODE_CONDITIONAL; arm_cpu_builtins (parse_in); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 98ac65044eb5..e6e01c756302 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-01-12 Christian Bruel + + PR target/69180 + * gcc.target/arm/pr69180.c: New test. + 2016-01-12 Richard Biener PR lto/69077