This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/59961] Use of size_t in leading term of computation with subtraction
- From: "schwab at linux-m68k dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 27 Jan 2014 19:03:26 +0000
- Subject: [Bug c/59961] Use of size_t in leading term of computation with subtraction
- Auto-submitted: auto-generated
- References: <bug-59961-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59961
--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
-100 is not the same as -s1. The latter is SIZE_MAX + 1 - 100, a big number,
depending on the size of size_t. If s1 is declared as unsigned short or
unsigned char, it will be promoted to int before any futher operation is
applied.