This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

[Bug c/59961] Use of size_t in leading term of computation with subtraction


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.


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