diff mbox

[3/4] AArch64: Cleanup inconsistent use of __extension__

Message ID 000e01cfc84e$deb434f0$9c1c9ed0$@com
State New
Headers show

Commit Message

Wilco Sept. 4, 2014, 2:45 p.m. UTC
Cleanup inconsistent use of __extension__.

ChangeLog:
2014-09-04  Wilco Dijkstra  <wdijkstr@arm.com>

	* gcc/config/aarch64/aarch64.c: Cleanup use of __extension__.

---
 gcc/config/aarch64/aarch64.c | 38 +++++++++++---------------------------
 1 file changed, 11 insertions(+), 27 deletions(-)

Comments

Marcus Shawcroft Sept. 4, 2014, 3:39 p.m. UTC | #1
On 4 September 2014 15:45, Wilco Dijkstra <wdijkstr@arm.com> wrote:
> Cleanup inconsistent use of __extension__.
>
> ChangeLog:
> 2014-09-04  Wilco Dijkstra  <wdijkstr@arm.com>
>
>         * gcc/config/aarch64/aarch64.c: Cleanup use of __extension__.

Write a proper ChangeLog entry please.
/Marcus
Marcus Shawcroft Sept. 4, 2014, 3:42 p.m. UTC | #2
On 4 September 2014 16:39, Marcus Shawcroft <marcus.shawcroft@gmail.com> wrote:
> On 4 September 2014 15:45, Wilco Dijkstra <wdijkstr@arm.com> wrote:
>> Cleanup inconsistent use of __extension__.
>>
>> ChangeLog:
>> 2014-09-04  Wilco Dijkstra  <wdijkstr@arm.com>
>>
>>         * gcc/config/aarch64/aarch64.c: Cleanup use of __extension__.
>
> Write a proper ChangeLog entry please.
> /Marcus


Actually, on second thoughts, I think it better to just remove the
three lines of the first spurious instance of:

#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
__extension__
#endif

and leave the other instances alone.

/Marcus
Wilco Sept. 11, 2014, 3:14 p.m. UTC | #3
OK, I'll skip this patch for now as HAVE_DESIGNATED_INITIALIZERS should
always be false, so there is no point in cleaning it up.

> -----Original Message-----
> From: Marcus Shawcroft [mailto:marcus.shawcroft@gmail.com]
> Sent: 04 September 2014 16:42
> To: Wilco Dijkstra
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH 3/4] AArch64: Cleanup inconsistent use of __extension__
> 
> On 4 September 2014 16:39, Marcus Shawcroft <marcus.shawcroft@gmail.com> wrote:
> > On 4 September 2014 15:45, Wilco Dijkstra <wdijkstr@arm.com> wrote:
> >> Cleanup inconsistent use of __extension__.
> >>
> >> ChangeLog:
> >> 2014-09-04  Wilco Dijkstra  <wdijkstr@arm.com>
> >>
> >>         * gcc/config/aarch64/aarch64.c: Cleanup use of __extension__.
> >
> > Write a proper ChangeLog entry please.
> > /Marcus
> 
> 
> Actually, on second thoughts, I think it better to just remove the
> three lines of the first spurious instance of:
> 
> #if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
> __extension__
> #endif
> 
> and leave the other instances alone.
> 
> /Marcus
diff mbox

Patch

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 57bb083..2c7c7c3 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -166,13 +166,12 @@  unsigned long aarch64_tune_flags = 0;
 #endif
 
 #if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
-__extension__
+# define EXTENSION __extension__
+#else
+# define EXTENSION
 #endif
 
-#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
-__extension__
-#endif
-static const struct cpu_addrcost_table generic_addrcost_table =
+EXTENSION static const struct cpu_addrcost_table generic_addrcost_table =
 {
 #if HAVE_DESIGNATED_INITIALIZERS
   .addr_scale_costs =
@@ -190,10 +189,7 @@  static const struct cpu_addrcost_table generic_addrcost_table =
   NAMED_PARAM (imm_offset, 0)
 };
 
-#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
-__extension__
-#endif
-static const struct cpu_addrcost_table cortexa57_addrcost_table =
+EXTENSION static const struct cpu_addrcost_table cortexa57_addrcost_table =
 {
 #if HAVE_DESIGNATED_INITIALIZERS
   .addr_scale_costs =
@@ -211,10 +207,7 @@  static const struct cpu_addrcost_table cortexa57_addrcost_table =
   NAMED_PARAM (imm_offset, 0),
 };
 
-#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
-__extension__
-#endif
-static const struct cpu_regmove_cost generic_regmove_cost =
+EXTENSION static const struct cpu_regmove_cost generic_regmove_cost =
 {
   NAMED_PARAM (GP2GP, 1),
   NAMED_PARAM (GP2FP, 2),
@@ -223,10 +216,7 @@  static const struct cpu_regmove_cost generic_regmove_cost =
 };
 
 /* Generic costs for vector insn classes.  */
-#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
-__extension__
-#endif
-static const struct cpu_vector_cost generic_vector_cost =
+EXTENSION static const struct cpu_vector_cost generic_vector_cost =
 {
   NAMED_PARAM (scalar_stmt_cost, 1),
   NAMED_PARAM (scalar_load_cost, 1),
@@ -243,10 +233,7 @@  static const struct cpu_vector_cost generic_vector_cost =
 };
 
 /* Generic costs for vector insn classes.  */
-#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
-__extension__
-#endif
-static const struct cpu_vector_cost cortexa57_vector_cost =
+EXTENSION static const struct cpu_vector_cost cortexa57_vector_cost =
 {
   NAMED_PARAM (scalar_stmt_cost, 1),
   NAMED_PARAM (scalar_load_cost, 4),
@@ -262,10 +249,7 @@  static const struct cpu_vector_cost cortexa57_vector_cost =
   NAMED_PARAM (cond_not_taken_branch_cost, 1)
 };
 
-#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
-__extension__
-#endif
-static const struct tune_params generic_tunings =
+EXTENSION static const struct tune_params generic_tunings =
 {
   &cortexa57_extra_costs,
   &generic_addrcost_table,
@@ -275,7 +259,7 @@  static const struct tune_params generic_tunings =
   NAMED_PARAM (issue_rate, 2)
 };
 
-static const struct tune_params cortexa53_tunings =
+EXTENSION static const struct tune_params cortexa53_tunings =
 {
   &cortexa53_extra_costs,
   &generic_addrcost_table,
@@ -285,7 +269,7 @@  static const struct tune_params cortexa53_tunings =
   NAMED_PARAM (issue_rate, 2)
 };
 
-static const struct tune_params cortexa57_tunings =
+EXTENSION static const struct tune_params cortexa57_tunings =
 {
   &cortexa57_extra_costs,
   &cortexa57_addrcost_table,