RFR: 8239001: Hotspot build broken on linux-sparc after 8238281
Kim Barrett
kim.barrett at oracle.com
Tue Feb 18 15:55:12 UTC 2020
> On Feb 16, 2020, at 2:58 PM, John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de> wrote:
>
> Hi Kim!
>
> On 2/15/20 10:30 PM, Kim Barrett wrote:
>> I prefer the approach using a non-ODR-used dummy to the approach of
>> casting of some random number to an address. Non-ODR-used
>> declarations are well supported by the standard (C++03 3.2) and widely
>> used; that's the basis for the "sizeof trick" metaprogramming idiom,
>> for example.
>
> I've now understood that approach and implemented it. Please see my patch in [1].
>
> FWIW, I have tried to put the declaration of RegistersForDebugging outside
> the X_offset() functions but that doesn't work. Hope the change is now
> okay as is :).
>
> Adrian
>
>> [1] http://cr.openjdk.java.net/~glaubitz/8239001/webrev.02/
Nope. That unnecessarily pollutes the global namespace with “dummy_regs”.
The dummy declaration should be in the RegistersForDebugging class as I suggested earlier.
But you say that “doesn’t work”. I thought perhaps that meant I’d made was a mistake in the
code snippet I’d sent, but that seems to work for me. So what do you mean by “doesn’t work”?
More information about the build-dev
mailing list