Hi Marek: Yes, I know it's non-fatal warning, but I think gcc should build with --enable-werror-always by it's self and it's the *ONLY* warning in trunk now.
Of cause, cast to int can suppress the warning, but it's not good solution so gcc complain that switch condition has bool type :) On Wed, Jul 8, 2015 at 9:30 PM, Marek Polacek <pola...@redhat.com> wrote: > On Wed, Jul 08, 2015 at 04:49:19PM +0800, Kito Cheng wrote: >> Bootstrapped & regression-tested on x86_64-linux-gnu :) >> >> 2015-07-08 Kito Cheng <kito.ch...@gmail.com> >> >> * function.c (stack_protect_epilogue): Use if rather than switch for >> check targetm.have_stack_protect_test(). > > Do you really need this? This should be just non-fatal warning in stage1, > and only if you compile with gcc-5, right? > You could also just cast the controlling expression of the switch to int to > suppress the warning. > > Marek