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

Improve Array(Pointer(T), _) or Pointer(Array(T, _)) declaration type desugaring according to cdecl #23

Open
arian opened this issue Dec 14, 2015 · 0 comments
Labels

Comments

@arian
Copy link
Owner

arian commented Dec 14, 2015

The desugaring of declarations does not always give the right type to variable according to the declaration.

Some examples of cdecl:

$ cdecl 
Type `help' or `?' for help
cdecl> explain int*
syntax error
cdecl> explain int* a;
declare a as pointer to int
cdecl> explain int *a[];
declare a as array of pointer to int
cdecl> explain int (*a)[];
declare a as pointer to array of int
cdecl> explain int (*a)(int);
declare a as pointer to function (int) returning int
cdecl> explain float (*a)(int);
declare a as pointer to function (int) returning float
cdecl> explain float (*a)(int *);
declare a as pointer to function (pointer to int) returning float
@arian arian added the basec label Dec 14, 2015
arian added a commit that referenced this issue Dec 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant