RFR: JDK-8326974: ODR violation in macroAssembler_aarch64.cpp

Aleksey Shipilev shade at openjdk.org
Thu Feb 29 13:27:42 UTC 2024


On Thu, 29 Feb 2024 09:47:11 GMT, Andrew Haley <aph at openjdk.org> wrote:

> This is a slightly different patch from the one suggested by the bug reporter. It doesn't make any sense to export those classes globally, so I've given them internal linkage.

I think the patch suggested in bug was better, and in line with [Hotspot Style Guide](https://github.com/openjdk/jdk/blob/master/doc/hotspot-style.md), which says: "Global names must be unique, to avoid [One Definition Rule](https://en.cppreference.com/w/cpp/language/definition) (ODR) violations. A common prefixing scheme for related global names is often used. (This is instead of using namespaces, which are mostly avoided in HotSpot.)"

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

PR Comment: https://git.openjdk.org/jdk/pull/18056#issuecomment-1971133442


More information about the hotspot-dev mailing list