On 3/15/21 6:56 PM, Anton Kozlov wrote: > On Wed, 10 Mar 2021 11:21:44 GMT, Andrew Haley <a...@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