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 for missing declaration in for loops is confusing. #4813

Open
fruffy opened this issue Jul 16, 2024 · 0 comments
Open

Error message for missing declaration in for loops is confusing. #4813

fruffy opened this issue Jul 16, 2024 · 0 comments
Assignees
Labels
core Topics concerning the core segments of the compiler (frontend, midend, parser)

Comments

@fruffy
Copy link
Collaborator

fruffy commented Jul 16, 2024

Currently, the error message for missing to declare a variable in the for-loop looks like this:

loop3-err.p4(51):syntax error, unexpected IN
        for (i in
               ^^
[--Werror=overlimit] error: 1 errors encountered, aborting compilation

This is confusing. We should have a better error message, ideally in the front end.

Originally posted by @fruffy in #4812 (comment)

@fruffy fruffy added the core Topics concerning the core segments of the compiler (frontend, midend, parser) label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Topics concerning the core segments of the compiler (frontend, midend, parser)
Projects
None yet
Development

No branches or pull requests

2 participants