aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Bruel <christian.bruel@st.com>2016-01-12 16:01:12 +0100
committerChristian Bruel <chrbr@gcc.gnu.org>2016-01-12 16:01:12 +0100
commit81b9a3d9f567e55d7ddd3745d3802cf346446270 (patch)
treec32601cf34c6b1e80a7ac0f31c30590a0a00eaea
parent0d1ed41261a495ed3c821b8252283e1f26597f53 (diff)
downloadgcc-81b9a3d9f567e55d7ddd3745d3802cf346446270.zip
gcc-81b9a3d9f567e55d7ddd3745d3802cf346446270.tar.gz
gcc-81b9a3d9f567e55d7ddd3745d3802cf346446270.tar.bz2
re PR target/69180 ([ARM] #pragma GCC target should not warn about redefined macros)
PR target/69180 * config/arm/arm-c.c (arm_pragma_target_parse): Set NODE_CONDITIONAL for __ARM_NEON_FP, __ARM_FP, _ARM_FEATURE_LDREX. From-SVN: r232276
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/arm/arm-c.c15
-rw-r--r--gcc/testsuite/ChangeLog5
3 files changed, 24 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7af68e6..578717c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-01-12 Christian Bruel <christian.bruel@st.com>
+
+ 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 <jakub@redhat.com>
PR target/69198
diff --git a/gcc/config/arm/arm-c.c b/gcc/config/arm/arm-c.c
index a0195ce..5810608 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 98ac650..e6e01c7 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-12 Christian Bruel <christian.bruel@st.com>
+
+ PR target/69180
+ * gcc.target/arm/pr69180.c: New test.
+
2016-01-12 Richard Biener <rguenther@suse.de>
PR lto/69077