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

[CN] feature: allow mention of function pointers with empty parameter lists #438

Closed
peterohanley opened this issue Jul 26, 2024 · 2 comments · Fixed by #459
Closed

[CN] feature: allow mention of function pointers with empty parameter lists #438

peterohanley opened this issue Jul 26, 2024 · 2 comments · Fixed by #459
Assignees
Labels
desugaring bug in Cabs_to_ail{_*}.lem

Comments

@peterohanley
Copy link

struct foo {
    int (*bar)();
};
% cn verify empty_param.c 
empty_param.c:1:1: error: C-type signed int ()*
struct foo {
~~~~~~~^~~~~ 

This is holding up TA2 work. We don't need to be able to call these functions at this time. I expect calling them will require an ownership that includes an actual type for the pointer.

@dc-mak dc-mak added the cn label Jul 30, 2024
@yav yav self-assigned this Aug 2, 2024
@yav
Copy link
Collaborator

yav commented Aug 2, 2024

I'll have a go at fixing this. In the meantime, adding an explicit void to the parameter list seems to make things work, in case this is an option.

@cp526
Copy link
Collaborator

cp526 commented Aug 5, 2024

@kmemarian comments: as noted on the PR ( #459 ) this isn't completely fixed yet: some change of Cerberus's handling of FunctionNoParams is needed in the frontend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desugaring bug in Cabs_to_ail{_*}.lem
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants