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

non-OKL attribute related error in modified by normalizer line #199

Open
pavlo-hilei opened this issue Apr 23, 2024 · 1 comment
Open

non-OKL attribute related error in modified by normalizer line #199

pavlo-hilei opened this issue Apr 23, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@pavlo-hilei
Copy link
Collaborator

This code doesn't show correct caret in error message:

@kernel void test_kern() {
    @outer for (int i = 0; j < 10; ++i) {
        @inner for (int j = 0; j < 10; ++j) {
        }
    }
}

Error:

./temp/test18.cpp:2:5: error: use of undeclared identifier 'j'
    2 |     @outer for (int i = 0; j < 10; ++i) {
      |     ^

Expected:

./temp/test18.cpp:2:5: error: use of undeclared identifier 'j'
    2 |     @outer for (int i = 0; j < 10; ++i) {
      |                            ^

This is a problem only when normalization is done.

@pavlo-hilei
Copy link
Collaborator Author

This error will be generated during AST parsing on gnu to std stage. I propose to save delta tree produced by previous stages to recover correct column

@pavlo-hilei pavlo-hilei added the enhancement New feature or request label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant