Draft
Conversation
f974dc3 to
5e2c1f2
Compare
5e2c1f2 to
ad0acb0
Compare
ChrisDodd
reviewed
Apr 13, 2025
frontends/common/constantParsing.cpp
Outdated
| if (!cst->fitsInt()) { | ||
| ::P4::error(ErrorType::ERR_OVERLIMIT, | ||
| "%1$x: this implementation does not support bitstrings this large", cst); | ||
| "%1%: this implementation does not support bitstrings this large", cst); |
Contributor
There was a problem hiding this comment.
This changes from printing the bitstring a hex to printing it as decimal, which seems less useful. Is there a way to have boost::formatter print in hex?
Collaborator
Author
There was a problem hiding this comment.
%x should give hex printing if using the abseil formatter. Not quite clear how to migrate smoothly here...
The problem here in particular is that cst is a IR::Constant pointer and the operator<< for it doesn't generate hex. And, according to the reference files, this output already generated decimal format: https://github.com/p4lang/p4c/blob/main/testdata/p4_16_errors_outputs/width_e.p4-stderr#L1
ad0acb0 to
a961fbf
Compare
a961fbf to
8a65ab7
Compare
a1c3278 to
221f1eb
Compare
74e4d6e to
44aa52a
Compare
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
44aa52a to
65d38a9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.