This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [BUILDROBOT][PATCH] Fix mmix (unused variable)

On Fri, 2014-07-18 20:36:20 -0400, Hans-Peter Nilsson <> wrote:
> On Fri, 18 Jul 2014, Jan-Benedict Glaw wrote:
> > This was a build using GCC's ./contrib/ to do the build.
> > It passes --enable-werror-always to top-level `configure', this is
> > where the -Werror comes from.
> Aha.  Looks like it's of more use than theoretical pain; sounds
> like this should (effectively) be the default for *non-releases*
> when cross-compiling, with the possibility to override
> per-target.  Agreement?  Anyone against?  1/2 :)

I'm all for it.

> It should be per-target because there *may* be port-specific
> constructs warned about by buggy previous-but-not-ancient
> gcc-versions, where working around the warnings would cause
> unwanted obfuscation.  (IIRC gdb does something like this.)

For example, the PDP11 target has an unresoved warning:

g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -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/opt/cfarm/mpc/include  -I../../../gcc/gcc/../libdecnumber -I../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../../gcc/gcc/../libbacktrace    -o cfgexpand.o -MT cfgexpand.o -MMD -MP -MF ./.deps/cfgexpand.TPo ../../../gcc/gcc/cfgexpand.c
../../../gcc/gcc/cfgexpand.c: In function âbasic_block_def* expand_gimple_cond(basic_block, gimple)â:
../../../gcc/gcc/cfgexpand.c:2100: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

ISTR that I brought this up on the list, but there wasn't a final
solution about how to "fix" that; the warning is kind of questionable
in this context, but in itself is correct.

> Is that the reason it's not the default, that there are such
> constructs in the non-port-specific parts?  But then that would
> have already been noticed through use of the, no?

Don't know :)


      Jan-Benedict Glaw              +49-172-7608481
Signature of:              What we do for ourselves dies with us. What we do for
the second  :         others and the world remains and is immortal. (Albert Pine)

Attachment: signature.asc
Description: Digital signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]