Jerry Quinn <jlqu...@optonline.net> writes:

> I just tried to bootstrap the gcc-in-cxx branch, but it fails in stage
> 2. If I expand the macros, the code looks OK to me.
>
> Any suggestions on how to go about tracking this down (if someone else
> doesn't get there first)?

Tobias Schlüter saw the same thing; I don't know why I don't see it.

> ../.././gcc/config/i386/i386.c:3282: error: comparison is always true
> due to limited range of data type

#define IN_RANGE(VALUE, LOWER, UPPER) \
  ((unsigned HOST_WIDE_INT) (VALUE) - (unsigned HOST_WIDE_INT) (LOWER) \
   <= (unsigned HOST_WIDE_INT) (UPPER) - (unsigned HOST_WIDE_INT) (LOWER))

enum processor_type
{
  PROCESSOR_I386 = 0,                   /* 80386 */
  PROCESSOR_I486,                       /* 80486DX, 80486SX, 80486DX[24] */
  PROCESSOR_PENTIUM,
  PROCESSOR_PENTIUMPRO,
  PROCESSOR_GEODE,
  PROCESSOR_K6,
  PROCESSOR_ATHLON,
  PROCESSOR_PENTIUM4,
  PROCESSOR_K8,
  PROCESSOR_NOCONA,
  PROCESSOR_CORE2,
  PROCESSOR_GENERIC32,
  PROCESSOR_GENERIC64,
  PROCESSOR_AMDFAM10,
  PROCESSOR_max
};

enum processor_type ix86_arch;

  gcc_assert (IN_RANGE (ix86_arch, 0, 255));

It all looks fine to me.

The way to track this down is to run g++ with the -v option, run gdb on
cc1plus, break on warning when opt == OPT_Wtype_limits, and see where
the warning is coming from and why.

Ian

Reply via email to