Enable const
identifiers in bit slice expressions, and anywhere else local compile-time known values are allowed
#4920
Labels
p4-spec
Topics related to the P4 specification (https://github.com/p4lang/p4-spec/).
This change was made to the language spec recently: p4lang/p4-spec#1307
Thus according to the spec, the following code is legal:
but I believe this is not yet supported by p4c. This issue is to track when/if this is enhanced in p4c.
Note: Technically the language spec enhancement also allows
const
values to be used in any place where a local compile-time known value is required, but a bit slice hi or lo expression are the only ones I know of off the top of my head.The text was updated successfully, but these errors were encountered: