This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][ARM] Fix "control reached end of non-void function" warning and boostrap
- From: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>
- Date: Mon, 11 Nov 2013 13:48:46 +0000
- Subject: [PATCH][ARM] Fix "control reached end of non-void function" warning and boostrap
- Authentication-results: sourceware.org; auth=none
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