Beyond PR44767, bfin-elf has more --enable-werror-always issues: ../../gcc/gcc/config/bfin/bfin.c:339:3: error: enum conversion in initialization is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/config/bfin/bfin.c:339:3: error: (near initialization for ‘bfin_cpus[74].type’) [-Werror=c++-compat] ../../gcc/gcc/config/bfin/bfin.c: In function ‘expand_interrupt_handler_prologue’: ../../gcc/gcc/config/bfin/bfin.c:1258:11: error: variable ‘insn’ set but not used [-Werror=unused-but-set-variable] ../../gcc/gcc/config/bfin/bfin.c: In function ‘bfin_load_pic_reg’: ../../gcc/gcc/config/bfin/bfin.c:1314:13: error: variable ‘insn’ set but not used [-Werror=unused-but-set-variable] ../../gcc/gcc/config/bfin/bfin.c: In function ‘bfin_rtx_costs’: ../../gcc/gcc/config/bfin/bfin.c:3168:5: error: enum conversion when passing argument 2 of ‘rtx_cost’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/rtl.h:1175:12: note: expected ‘enum rtx_code’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:3169:5: error: enum conversion when passing argument 2 of ‘rtx_cost’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/rtl.h:1175:12: note: expected ‘enum rtx_code’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:3214:2: error: enum conversion when passing argument 2 of ‘rtx_cost’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/rtl.h:1175:12: note: expected ‘enum rtx_code’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:3239:2: error: enum conversion when passing argument 2 of ‘rtx_cost’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/rtl.h:1175:12: note: expected ‘enum rtx_code’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:3253:6: error: enum conversion when passing argument 2 of ‘rtx_cost’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/rtl.h:1175:12: note: expected ‘enum rtx_code’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:3258:6: error: enum conversion when passing argument 2 of ‘rtx_cost’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/rtl.h:1175:12: note: expected ‘enum rtx_code’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c: In function ‘bfin_adjust_cost’: ../../gcc/gcc/config/bfin/bfin.c:3661:7: error: ISO C90 forbids mixed declarations and code [-Werror=edantic] ../../gcc/gcc/config/bfin/bfin.c:3640:18: error: variable ‘insn_type’ set but not used [-Werror=unused-but-set-variable] ../../gcc/gcc/config/bfin/bfin.c: At top level: ../../gcc/gcc/config/bfin/bfin.c:3721:27: error: using ‘loop_info’ as both a typedef and a tag is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/config/bfin/bfin.c:3721:16: note: originally defined here ../../gcc/gcc/config/bfin/bfin.c: In function ‘workaround_rts_anomaly’: ../../gcc/gcc/config/bfin/bfin.c:5060:13: error: enum conversion in initialization is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/config/bfin/bfin.c: In function ‘harmless_null_pointer_p’: ../../gcc/gcc/config/bfin/bfin.c:5112:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] ../../gcc/gcc/config/bfin/bfin.c:5115:57: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] ../../gcc/gcc/config/bfin/bfin.c: In function ‘trapping_loads_p’: ../../gcc/gcc/config/bfin/bfin.c:5129:7: error: unused variable ‘pat’ [-Werror=unused-variable] ../../gcc/gcc/config/bfin/bfin.c: In function ‘note_np_check_stores’: ../../gcc/gcc/config/bfin/bfin.c:5189:54: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] ../../gcc/gcc/config/bfin/bfin.c:5187:40: error: unused parameter ‘pat’ [-Werror=unused-parameter] ../../gcc/gcc/config/bfin/bfin.c: In function ‘bfin_reorg’: ../../gcc/gcc/config/bfin/bfin.c:5523:4: error: implicit declaration of function ‘maybe_skip_selective_scheduling’ [-Werror=implicit-function-declaration] ../../gcc/gcc/config/bfin/bfin.c:5524:9: error: implicit declaration of function ‘run_selective_scheduling’ [-Werror=implicit-function-declaration] ../../gcc/gcc/config/bfin/bfin.c: In function ‘bfin_expand_binop_builtin’: ../../gcc/gcc/config/bfin/bfin.c:6247:3: error: enum conversion when passing argument 4 of ‘expand_expr’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/expr.h:419:1: note: expected ‘enum expand_modifier’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:6248:3: error: enum conversion when passing argument 4 of ‘expand_expr’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/expr.h:419:1: note: expected ‘enum expand_modifier’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c: In function ‘bfin_expand_unop_builtin’: ../../gcc/gcc/config/bfin/bfin.c:6304:3: error: enum conversion when passing argument 4 of ‘expand_expr’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/expr.h:419:1: note: expected ‘enum expand_modifier’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c: In function ‘bfin_expand_builtin’: ../../gcc/gcc/config/bfin/bfin.c:6368:7: error: enum conversion when passing argument 4 of ‘expand_expr’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/expr.h:419:1: note: expected ‘enum expand_modifier’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:6396:7: error: enum conversion when passing argument 4 of ‘expand_expr’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/expr.h:419:1: note: expected ‘enum expand_modifier’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:6397:7: error: enum conversion when passing argument 4 of ‘expand_expr’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/expr.h:419:1: note: expected ‘enum expand_modifier’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:6455:7: error: enum conversion when passing argument 4 of ‘expand_expr’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/expr.h:419:1: note: expected ‘enum expand_modifier’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:6456:7: error: enum conversion when passing argument 4 of ‘expand_expr’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/expr.h:419:1: note: expected ‘enum expand_modifier’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:6491:7: error: enum conversion when passing argument 4 of ‘expand_expr’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/expr.h:419:1: note: expected ‘enum expand_modifier’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:6492:7: error: enum conversion when passing argument 4 of ‘expand_expr’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/expr.h:419:1: note: expected ‘enum expand_modifier’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:6493:7: error: enum conversion when passing argument 4 of ‘expand_expr’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/expr.h:419:1: note: expected ‘enum expand_modifier’ but argument is of type ‘int’ ../../gcc/gcc/config/bfin/bfin.c:6545:7: error: enum conversion when passing argument 4 of ‘expand_expr’ is invalid in C++ [-Werror=c++-compat] ../../gcc/gcc/expr.h:419:1: note: expected ‘enum expand_modifier’ but argument is of type ‘int’
Patch has been posted here: http://gcc.gnu.org/ml/gcc-patches/2010-11/msg01020.html
Author: amylaar Date: Fri Nov 12 17:15:18 2010 New Revision: 166661 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166661 Log: PR target/46412 * config/bfin/bfin-protos.h (bfin_local_alignment): Update prototype. * config/bfin/bfin.c: Include sel-sched.h . (bfin_cpus): Use BFIN_CPU_UNKNOWN for last initializer element. (expand_interrupt_handler_prologue): Remove unused variable insn. (bfin_load_pic_reg): Likewise. (bfin_rtx_costs): Make code / outer_code variables of type enum rtx_code, copied from re-named parameters. (bfin_local_alignment): Change align argument and return type to unsigned. (bfin_adjust_cost): Remove unused variable insn_type. Declare variables at start of block. (struct loop_info): Rename to... (struct loop_info_d). (workaround_rts_anomaly): Change type of icode to int. (harmless_null_pointer_p): Cast REGNO (..) to int before comparison with int-typed variable. (note_np_check_stores): Likewise. (trapping_loads_p): Remove unused variable pat. (bfin_expand_binop_builtin): Use expand_normal. (bfin_expand_unop_builtin): Likewise. (bfin_expand_builtin): Likewise. Set tmode before use. Modified: trunk/gcc/ChangeLog trunk/gcc/config/bfin/bfin-protos.h trunk/gcc/config/bfin/bfin.c
Patch has been applied to trunk.