On Fri, May 13, 2016 at 3:05 PM, Bernd Schmidt <bschm...@redhat.com> wrote: > On 05/13/2016 12:20 PM, Richard Biener wrote: >> >> I'm not much of a fan of C++-ification (in this case it makes review >> harder) but well ... > > > I felt it was a pretty natural way to structure the code to avoid > duplicating the same logic across more functions, and we might as well use > the language for such purposes given that we've bothered to switch. > >> + if (tree_fits_uhwi_p (len) >> + && (leni = tree_to_uhwi (len)) <= GET_MODE_SIZE (word_mode) >> + && exact_log2 (leni) != -1 >> + && (align1 = get_pointer_alignment (arg1)) >= leni * BITS_PER_UNIT >> + && (align2 = get_pointer_alignment (arg2)) >= leni * BITS_PER_UNIT) >> >> I think * BITS_PER_UNIT has to be * 8 here as the C standard defines >> it that way. > > > Huh? Can you elaborate?
When you have a builtin taking a size in bytes then a byte is 8 bits, not BITS_PER_UNIT bits. Richard. > [...] >> >> Ok with those changes. > > > Thanks. I won't be reading email for the next two weeks, so I'll be checking > it in afterwards. > > > Bernd