This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch ARM] Unbreak ARM bootstrap.
- From: Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: bernds at codesourcery dot com, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Fri, 27 Aug 2010 11:12:31 +0100
- Subject: [Patch ARM] Unbreak ARM bootstrap.
- Reply-to: ramana dot radhakrishnan at arm dot com
Hi,
This unbreaks bootstraps on arm-linux-gnueabi which started failing
because of issues with warnings of -Werror=c++-compat because the return
value was being type-casted automatically from one enum type to another.
error: enum conversion in return is invalid in C++ [-Werror=c++-compat]
error: enum conversion in return is invalid in C++ [-Werror=c
++-compat]
error: enum conversion in return is invalid in C++ [-Werror=c++-compat]
Verified that stage2 proceeds further with this. Committing as obvious
in the next few minutes unless someone has any objections to this.
cheers
Ramana
* config/arm/arm.md (enabled): Test the value of arch_enabled
rather than just using it.
Index: trunk/gcc/config/arm/arm.md
===================================================================
--- trunk/gcc/config/arm/arm.md (revision 163581)
+++ trunk/gcc/config/arm/arm.md (working copy)
@@ -236,7 +236,9 @@
; Enable all alternatives that are both arch_enabled and insn_enabled.
(define_attr "enabled" "no,yes"
(if_then_else (eq_attr "insn_enabled" "yes")
- (attr "arch_enabled")
+ (if_then_else (eq_attr "arch_enabled" "yes")
+ (const_string "yes")
+ (const_string "no"))
(const_string "no")))
; POOL_RANGE is how far away from a constant pool entry that this insn