diff mbox

[ARM] Fix "control reached end of non-void function" warning and boostrap

Message ID 5280E03E.1080705@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov Nov. 11, 2013, 1:48 p.m. UTC
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.

Comments

Ramana Radhakrishnan Nov. 11, 2013, 1:50 p.m. UTC | #1
On 11/11/13 13:48, Kyrill Tkachov wrote:
> 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?

Ouch !

Ok.

Ramana

>
> Thanks,
> Kyrill
>
> 2013-11-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>
>       * config/arm/arm.c (arm_new_rtx_costs): Return after handling
>       comparisons.
>
diff mbox

Patch

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