http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54664
Bug #: 54664 Summary: expand_gimple_cond warning for predictably small BRANCH_COST Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassig...@gcc.gnu.org ReportedBy: amyl...@gcc.gnu.org Blocks: 44756 Target: pdp11-aout g++ -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../../gcc/gcc -I../../../gcc/gcc/. -I../../../gcc/gcc/../include -I../../../gcc/gcc/../libcpp/include -I../../../gcc/gcc/../libdecnumber -I../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber ../../../gcc/gcc/cfgexpand.c -o cfgexpand.o ../../../gcc/gcc/cfgexpand.c: In function ‘basic_block_def* expand_gimple_cond(basic_block, gimple)’: ../../../gcc/gcc/cfgexpand.c:1810:65: error: comparison is always true due to limited range of data type [-Werror=type-limits] else if (BRANCH_COST (optimize_insn_for_speed_p (), false) < 4) ^ cc1plus: all warnings being treated as errors make[2]: *** [cfgexpand.o] Error 1 pdp11.h defines BRANCH_COST as a macro that yield either 0 or 1. cfgexpand.c:expand_gimple_cond compares this to 4. Because of the warning options we use for building cfgexpand.o, we cant't build it for pdp11 configured with --emable-werror-always.