-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8329549: Remove FORMAT64_MODIFIER #22918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into |
|
@coleenp This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 33 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
| // Format without leading 0x | ||
| #define INT64_FORMAT_X_0_ "%016" PRIx64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the trailing underscore?
The name doesn't make sense to me given we have UINT64_FORMAT_X_0 and the only difference here is the leading 0x which doesn't really have anything to do with signed-ness. Maybe RAW_UINT64_FORMAT_X_0 to indicate the dropped 0x prefix ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. All the macros start with UINT64_FORMAT though. How about UINT64_FORMAT_RAW_X_0 ? or UINT64_FORMAT_X_0_RAW ? Still not great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UINT64_FORMAT_RAW_X_0 is not terrible. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest though I don't know why we want hexadecimal output without the leading 0x ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The _X infix is meant to indicate 0x. I think UINT64_FORMAT_0 is what you are looking for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought X was hexadecimal. That's a lot better. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Guide to the suffixes used in the format specifiers for integers:
// - print the decimal value: 745565
// _X - print as hexadecimal, without leading 0s: 0x12345
// _X_0 - print as hexadecimal, with leading 0s: 0x00012345
It wasn't obvious to me that the _X meant hexadecimal-with-0x-prefix versus simply hexadecimal. But I have no issue with always doing 0x :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. You are right. I read too much into the comment (that I wrote some time ago :) )
dholmes-ora
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks good to me. Thanks
|
Thanks for reviewing, David. |
kimbarrett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
|
Thanks for the review Kim. |
|
/integrate |
|
Going to push as commit ddb5881.
Your commit was automatically rebased without conflicts. |
This change removes FORMAT64_MODIFIER but adds another INT64_FORMAT_X_0_ macro to specify not having leading "0x" in the output. Suggestions for better macro name welcome.
GHA tested.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22918/head:pull/22918$ git checkout pull/22918Update a local copy of the PR:
$ git checkout pull/22918$ git pull https://git.openjdk.org/jdk.git pull/22918/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22918View PR using the GUI difftool:
$ git pr show -t 22918Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22918.diff
Using Webrev
Link to Webrev Comment