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`). The rest of the defines in this file follows the pattern: a define 
without a value to be checked with `#ifdef` and define with a value to be 
checked with `#if`. To be consistent, I would need to add `#define R18_RESERVED 
false` to the `#else` clause and change every `#ifdef R18_RESERVED`/`#ifndef 
R18_RESERVED` to `#if R18_RESERVED`/`#if !R18_RESERVED`. I think we'll win in 
clarity in the long term if I will not implement the suggestion without related 
changes. (And related changes would introduce additional noise, which we are 
fighting with).

-------------

PR: https://git.openjdk.java.net/jdk/pull/2200

Reply via email to