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] Fix "control reached end of non-void function" warning and boostrap


Hi all,

My patch last Friday introduced a warning about reaching the end of a non-void function which breaks bootstrap. On second thought, instead of breaking at the end of the comparisons handling, we should just return instead.

Tested arm-none-eabi on qemu and checked the build log to make sure the warning disappears.

Ok for trunk?

Thanks,
Kyrill

2013-11-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

    * config/arm/arm.c (arm_new_rtx_costs): Return after handling
    comparisons.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 2aa739d..62ec7f7 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -10154,7 +10154,7 @@ arm_new_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
 	  *cost = 0;
 	  return true;
 	}
-      break;
+      return false;
 
     case ABS:
       if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT

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