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

Passing structs with size > 8 throws "Unknown data size" error #12

Open
vasyop opened this issue Jun 14, 2019 · 3 comments
Open

Passing structs with size > 8 throws "Unknown data size" error #12

vasyop opened this issue Jun 14, 2019 · 3 comments

Comments

@vasyop
Copy link

vasyop commented Jun 14, 2019

No description provided.

@yetingk
Copy link
Contributor

yetingk commented Jun 17, 2019

Could you tell me what the code you input to MazuCC? I have a different result, my command like that:

$ cat sample/test.c
struct abcd {
    int a;
    int b;
    int c;
    int d;
} abcd;
$ ./mzcc < sample/test.c
.data                # emit_data_section:724
.lcomm abcd, 16      # emit_global_var -> emit_bss:709

@vasyop vasyop changed the title Passing structs with size > 12 throws "Unknown data size" error Passing structs with size > 8 throws "Unknown data size" error Jun 17, 2019
@vasyop
Copy link
Author

vasyop commented Jun 17, 2019

try passing an instance (not a pointer) of abcd to a function

@yetingk
Copy link
Contributor

yetingk commented Jun 18, 2019

Thanks, I got it.

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

2 participants