X-Git-Url: http://deadsoftware.ru/gitweb?p=dsw-obn.git;a=blobdiff_plain;f=generator.c;h=b17a8cd977cf450733a38fe9510b01db8754bd6f;hp=419a2b22c4c2dbb765a9656163f701c645637eb8;hb=7d4370a6cf1df8bacbead0511e4a9a1b6941003e;hpb=734fa8f9223c140a583e7f193df810d48555ac34 diff --git a/generator.c b/generator.c index 419a2b2..b17a8cd 100644 --- a/generator.c +++ b/generator.c @@ -103,7 +103,11 @@ oberon_generator_init_type(oberon_context_t * ctx, oberon_type_t * type) } else if(type -> class == OBERON_TYPE_RECORD) { - gcc_struct = gcc_jit_context_new_opaque_struct(gcc_context, NULL, ""); + char name[32]; + snprintf(name, 32, "RECORD%u", gen_context -> record_count); + gen_context -> record_count += 1; + + gcc_struct = gcc_jit_context_new_opaque_struct(gcc_context, NULL, name); gcc_type = gcc_jit_struct_as_type(gcc_struct); } else if(type -> class == OBERON_TYPE_POINTER)