RFR: 8183544: Missing parentheses in is_size_aligned_ macro
stefan.karlsson at oracle.com
Wed Jul 5 10:46:27 UTC 2017
On 2017-07-05 03:02, Kim Barrett wrote:
>> On Jul 4, 2017, at 10:24 AM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
>> Hi all,
>> Please review this trivial patch to add parentheses to the is_aligned_ macro (used to be named is_size_aligned_).
>> MikaelG found this issue while reviewing another patch.
> I'm confused by the existing definition. Why isn't it
> #define is_aligned_(size, alignment) (((size) & align_mask(alignment)) == 0)
> That seems like it would be simpler, faster, and avoid multiple
> evaluation of the size expression.
I don't know. Maybe because it's a tad bit more readable in this
"high-level" version, for some?
I created and will fix:
More information about the hotspot-dev