The conditional expression of ternary operator does not support action_params
Closed this issue · 2 comments
shouxi commented
Hi, p4c compiler would yield ERROR: Undeclared identifier xxx
, provided the ternary operator uses an action_param (e.g., xxx) in its conditional expression. This seems to be a bug (although easy to avoid by assigning the runtime value to a metadata field and using it for cond expressions instead).
antoninbas commented
Hi Shouxi,
It would be useful if you could provide a small P4 program to help us reproduce this issue.
Thanks
shouxi commented
Hi Antonin,
See test.p4.txt, modified from P4 v1.1 Simple Router.