RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v21]

Andrew Haley aph at redhat.com
Tue Mar 16 09:16:02 UTC 2021


On 3/15/21 6:56 PM, Anton Kozlov wrote:
> On Wed, 10 Mar 2021 11:21:44 GMT, Andrew Haley <aph at openjdk.org> wrote:
> 
>>> We always check for `R18_RESERVED` with `#if(n)def`, is there any reason to define the value for the macro?
>>
>> Robustness, clarity, maintainability, convention. Why not?
> 
> I've tried to implement the suggestion, but it pulled more unnecessary changes. It makes the intended way to check the condition less clear (`#ifdef` and not `#if`).

No, no, no! I am not suggesting you change anything else, just that
you do not define contentless macros. You might as well define it
to be something, and true is a reasonable default, that's all. It's
not terribly important, it's just good practice.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671




More information about the build-dev mailing list