Skip to content
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

p4test gives error for what looks like legal if code inside action #512

Closed
jafingerhut opened this issue Apr 23, 2017 · 1 comment
Closed

Comments

@jafingerhut
Copy link
Contributor

See the attached P4 program, in particular action 'foo'. The error I get from both p4test and p4c-bm2-ss is:

error: Could not find declaration for pred

There is no line number for the error, and nothing in the program named 'pred'.

There are 3 lines inside action 'foo', as explained in the comments, such that commenting out or deleting any one of them causes the error to go away. That might help find a root cause for this issue.
could-not-find-pred-declaration.p4.txt

@jafingerhut
Copy link
Contributor Author

jafingerhut commented Apr 26, 2017

Confirmed that after the commits for this issue, the test program I submitted no longer gives an error, and appears to produce a correct bmv2 JSON file using the ternary operator. Thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant