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

Pretty-printing of Clight uses wrong subscopes #295

Open
andrew-appel opened this issue Oct 23, 2018 · 2 comments
Open

Pretty-printing of Clight uses wrong subscopes #295

andrew-appel opened this issue Oct 23, 2018 · 2 comments

Comments

@andrew-appel
Copy link
Collaborator

This line of Clightnotations.v does not work properly,

Notation "'for' ( s1 ; e ; s2 ) { s3 }" := (Sfor s1%print_stmt_for e%expr s3%C s2%print_stmt_for) ... : C_scope.

and the reason is Coq bug 8805.

The consequence of the bug is that an extra semicolon printed after s1, because Coq interprets s1 in C_scope instead of in print_stmt_for_scope as it should. Refer to these two lines of Clightnotations.v:

Notation "id = e2" := (Sset id%positive e2%expr) ... : print_stmt_for_scope.
Notation "id = e2 ;" := (Sset id%positive e2%expr) ... : C_scope.

The Coq issue report suggests this will likely be fixed in Coq version 8.10.

@andrew-appel
Copy link
Collaborator Author

It is not yet fixed in Coq 8.11.

@andrew-appel
Copy link
Collaborator Author

Still not fixed in Coq 8.18.

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