RFR: JDK-8326974: ODR violation in macroAssembler_aarch64.cpp
Kim Barrett
kbarrett at openjdk.org
Thu Feb 29 13:33:52 UTC 2024
On Thu, 29 Feb 2024 13:25:20 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> 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.)"
See also the section "Namespaces", and in particular the specific admonition against using anonymous namespaces.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18056#issuecomment-1971139662
More information about the hotspot-dev
mailing list