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 middle-end/50066] [4.7 Regression] Bad signed int to unsigned long long conversion


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50066

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2011-08-13 12:09:16 UTC ---
This code comes from mpz/set_si.c in gmp:

void
mpz_set_si (mpz_ptr dest, signed long int val)
{
  mp_size_t size;
  mp_limb_t vl;

  vl = (mp_limb_t) (unsigned long int) (val >= 0 ? val : -val);

mp_limb_t is unsigned 64bit and long is 32bit. It works
with all released GCC versions.


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