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
Address spec issue #915 - Specify the types allowed for header stack indexes #923
Address spec issue #915 - Specify the types allowed for header stack indexes #923
Conversation
- `int<W>` - a `W`-bit signed integer where `W >= 1` (section | ||
[#sec-signed-integers]) | ||
- a serializable `enum` with an underlying type that is `bit<W>` or | ||
`int<W>` (section [#sec-enum-types]). |
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.
@jafingerhut AI Andy to create a small test program and see whether p4c accepts a header stack index with type of serializable enum is supported today.
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.
A simple test program shows that recent versions of p4c given an error when one attempts to use an expression of type enum bit<8> ...
as the index of a header stack reference: p4lang/p4c#2726
Check whether the implementation supports enums. |
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 compiler now supports all these cases: p4lang/p4c#2738
1279a8e
to
6a36bd3
Compare
@mbudiu-vmw I am pretty sure we agreed to merge this into the spec during the 2021-May-03 LDWG meeting. It had a conflict (in the change log section, as expected) which should now be resolved. I will let you push the merge button for this, in case I am mixed up on PRs. |
No description provided.