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

Error message when comparing table.apply() does not give a hint where the issue was #3846

Closed
apinski-cavium opened this issue Jan 17, 2023 · 0 comments · Fixed by #3851
Closed
Assignees
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.

Comments

@apinski-cavium
Copy link

apinski-cavium commented Jan 17, 2023

Take:

#include <core.p4>

control c(in bit t)
{
  table tt {
    actions = {}
  }
  apply {
    if (tt.apply() == tt.apply()) {
    }
  }
}

control ct(in bit t);
package pt(ct c);

pt(c()) main;

With p4test we get:

t-1.p4(5): [--Werror=not-found] error: tt: declaration not found
  table tt {
        ^^

There is no hint that the problem is related to the tt.apply() == tt.apply() expression. But points you to the declaration of the table tt.

@mihaibudiu mihaibudiu added the bug This behavior is unintended and should be fixed. label Jan 18, 2023
@mihaibudiu mihaibudiu self-assigned this Jan 18, 2023
@mihaibudiu mihaibudiu added the fixed This topic is considered to be fixed. label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants