This is the mail archive of the
mailing list for the GCC project.
[PATCH] Fix bootstrap on ia64 with old GCC version.
- From: Martin Liška <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Michael Matz <matz at suse dot de>
- Date: Tue, 3 Jul 2018 19:22:19 +0200
- Subject: [PATCH] Fix bootstrap on ia64 with old GCC version.
In order to make GCC 4.1 happy and build current tip, we need to define
static constants out of a class definition.
Ready for trunk?
2018-07-03 Martin Liska <firstname.lastname@example.org>
* tree-switch-conversion.h (struct jump_table_cluster): Define
constant values outside of class declaration.
gcc/tree-switch-conversion.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/gcc/tree-switch-conversion.h b/gcc/tree-switch-conversion.h
index 4beac785f05..8efb125aff1 100644
@@ -259,12 +259,17 @@ struct jump_table_cluster: public group_cluster
static bool is_enabled (void);
/* Max growth ratio for code that is optimized for size. */
- static const unsigned HOST_WIDE_INT max_ratio_for_size = 3;
+ static const unsigned HOST_WIDE_INT max_ratio_for_size;
/* Max growth ratio for code that is optimized for speed. */
- static const unsigned HOST_WIDE_INT max_ratio_for_speed = 8;
+ static const unsigned HOST_WIDE_INT max_ratio_for_speed;
+const unsigned HOST_WIDE_INT jump_table_cluster::max_ratio_for_size = 3;
+const unsigned HOST_WIDE_INT jump_table_cluster::max_ratio_for_speed = 8;
/* A GIMPLE switch statement can be expanded to a short sequence of bit-wise
comparisons. "switch(x)" is converted into "if ((1 << (x-MINVAL)) & CST)"
where CST and MINVAL are integer constants. This is better than a series