PollArrayWrapper.c
kirk.pepperdine at gmail.com
kirk.pepperdine at gmail.com
Wed Mar 2 15:56:30 UTC 2016
Hi Andrew,
Thanks for the boring (as in good) answer. In this case it’s superfluous as it’s wrapping a single statement but..
Regards,
Kirk
> On Mar 2, 2016, at 9:51 AM, Andrew Haley <aph at redhat.com> wrote:
>
> On 03/02/2016 03:20 PM, kirk.pepperdine at gmail.com wrote:
>> Is there a reason why this logic is wrapped in a do { …. } while(0)
>
> Every multi-statement #define must always be wrapped in do { …. } while(0)
>
> consider
>
> if (blah)
> MACRO;
> else
> stuff;
>
> The { } mean the right thing happens with multiple statments;
> the while 0 eats the trailing semicolon in
>
> MACRO;
>
> Andrew.
>
More information about the hotspot-dev
mailing list