This is the mail archive of the
mailing list for the GCC project.
Re: Mainline bootstrap failure on hppa2.0w-hp-hpux11.00
- From: Russ Allbery <rra at stanford dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 05 Feb 2003 17:25:02 -0800
- Subject: Re: Mainline bootstrap failure on hppa2.0w-hp-hpux11.00
- Organization: The Eyrie
- References: <200302051806.h15I6ppL005932@hiauly1.hia.nrc.ca>
John David Anglin <firstname.lastname@example.org> writes:
> I read in 188.8.131.52 which discusses the usual arithmetic conversions,
> Otherwise, if the type of the operand with the signed integer
> can represent all of the values of the type of the operand
> with unsigned integer type, then the operand with unsigned
> integer type is converted to the type of the operand with
> signed integer type.
> It seems as if this would apply to the case in question.
It does, and it mandates that the int argument be promoted to unsigned.
It's important to read the beginning entirely literally: "if the *type*
of the operand with the signed integer can represent all of the values of
the *type* of the operand with the unsigned integer type...". int cannot
represent all of the values of unsigned int, therefore both values are
promoted to unsigned int.
Russ Allbery (email@example.com) <http://www.eyrie.org/~eagle/>