MazuCC icon indicating copy to clipboard operation
MazuCC copied to clipboard

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

Open vasyop opened this issue 6 years ago • 3 comments

vasyop avatar Jun 14 '19 13:06 vasyop

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

yetingk avatar Jun 17 '19 12:06 yetingk

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

vasyop avatar Jun 17 '19 13:06 vasyop

Thanks, I got it.

yetingk avatar Jun 18 '19 00:06 yetingk