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

Translate FunctionNoParams as a function without parameters. #459

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

yav
Copy link
Collaborator

@yav yav commented Aug 2, 2024

Fixes #438.

When this is merged, we should also merge PR #68 in the tutorial repo to fix the tests.

@cp526
Copy link
Collaborator

cp526 commented Aug 5, 2024

Kayvan says there's an issue in Cerberus' frontend: Cerberus should've handled FunctionNoParams – which really is different from a function with empty parameter list – before this even gets to CN. In the absence of that, this is a good workaround.


(* The meaning of a function with no parameters depends on the version of C,
but here we treat it as if it really has no parameter (i.e., like `void`)
which is what more recent versions of the standard do. *)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(As below, this is ok as a workaround, but FunctionNoParams has to be treated specially, in the Cerberus frontend before CN.)

@cp526 cp526 merged commit 3f93e78 into master Aug 5, 2024
1 check failed
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

Successfully merging this pull request may close these issues.

[CN] feature: allow mention of function pointers with empty parameter lists
2 participants