This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch ARM] Unbreak ARM bootstrap.


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]