My Mac was updated recently to Xcode 9.3. This new version gets a hiccup on the following line:
hs/src/hotspot/share/gc/g1/heapRegionSet.hpp:125:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
hs/src/hotspot/share/gc/g1/heapRegionSet.hpp:53:38: note: expanded from macro 'HEAP_REGION_SET_FORCE_VERIFY'
#define HEAP_REGION_SET_FORCE_VERIFY defined(ASSERT)
Switching back to Xcode 9.2 makes the error go away. However, the question remains: does the preprocessor do the right thing, i.e. recursively substitute the #defines?
This is a duplicate of JDK-8200550.