RFR: 8292981: Unify and restructure integer printing format specifiers [v4]

David Holmes dholmes at openjdk.org
Wed Aug 31 05:37:10 UTC 2022


On Tue, 30 Aug 2022 22:57:26 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> An alternative could be to switch so that _X means 0x and zero padding, and then use another letter to denote the case where we don't want the leading zeros.
>
> INTPTR_FORMAT zero pads, right? and that seems to be more prevalent in the code.  So THING_FORMAT_X seems like it should also pad since that's usually(?) what we want.  So I like this idea.  Then thinking of a way to say not to pad is hard - how about THING_FORMAT_X_NZ (NZ for no zero).  Are there a lot of these?
> Sorry for the drive by comments. If other people are fine, I'm okay with the names. I was just a bit surprised by the trailing zero on first read.

I think the naming convention in the PR is as good as any other - it is something new that we have to get used to.

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

PR: https://git.openjdk.org/jdk/pull/10042


More information about the hotspot-dev mailing list