@@ -3280,7 +3280,7 @@ std_map_Map__7 *std_map_Map__7_new(void) {
3280
3280
}
3281
3281
3282
3282
std_span_Location std_span_Location_default (void ) {
3283
- std_span_Location loc ;
3283
+ std_span_Location loc = { 0 } ;
3284
3284
loc .filename = "<default>" ;
3285
3285
loc .line = ((u32 )0 );
3286
3286
loc .col = ((u32 )0 );
@@ -3297,7 +3297,7 @@ bool std_span_Location_is_valid(std_span_Location *this) {
3297
3297
}
3298
3298
3299
3299
std_span_Span std_span_Span_default (void ) {
3300
- std_span_Span span ;
3300
+ std_span_Span span = { 0 } ;
3301
3301
span .start = (std_span_Location ){.filename = "<default>" , .line = ((u32 )0 ), .col = ((u32 )0 ), .index = ((u32 )0 )};
3302
3302
span .end = (std_span_Location ){.filename = "<default>" , .line = ((u32 )0 ), .col = ((u32 )0 ), .index = ((u32 )0 )};
3303
3303
return span ;
@@ -3308,7 +3308,7 @@ bool std_span_Span_is_valid(std_span_Span this) {
3308
3308
}
3309
3309
3310
3310
std_span_Span std_span_Span_join (std_span_Span this , std_span_Span other ) {
3311
- std_span_Span span ;
3311
+ std_span_Span span = { 0 } ;
3312
3312
span .start = this .start ;
3313
3313
span .end = other .end ;
3314
3314
return span ;
@@ -7598,6 +7598,15 @@ void passes_code_generator_CodeGenerator_gen_var_declaration(passes_code_generat
7598
7598
if (((bool )node -> u .var_decl .init )) {
7599
7599
std_buffer_Buffer_puts (& this -> out , " = " );
7600
7600
passes_code_generator_CodeGenerator_gen_expression (this , node -> u .var_decl .init );
7601
+ } else {
7602
+ switch (var -> type -> base ) {
7603
+ case types_BaseType_Array :
7604
+ case types_BaseType_Structure : {
7605
+ std_buffer_Buffer_puts (& this -> out , " = {0}" );
7606
+ } break ;
7607
+ default : {
7608
+ } break ;
7609
+ }
7601
7610
}
7602
7611
}
7603
7612
@@ -7971,7 +7980,7 @@ char *passes_code_generator_CodeGenerator_helper_gen_type(passes_code_generator_
7971
7980
}
7972
7981
7973
7982
char * passes_code_generator_CodeGenerator_get_type_name_string (passes_code_generator_CodeGenerator * this , types_Type * type , char * name , bool is_func_def ) {
7974
- ae_assert ((type != NULL ), "compiler/passes/code_generator.oc:898 :12: Assertion failed: `type != null`" , NULL ); char * final = passes_code_generator_CodeGenerator_helper_gen_type (this , type , type , strdup (name ), is_func_def );
7983
+ ae_assert ((type != NULL ), "compiler/passes/code_generator.oc:903 :12: Assertion failed: `type != null`" , NULL ); char * final = passes_code_generator_CodeGenerator_helper_gen_type (this , type , type , strdup (name ), is_func_def );
7975
7984
str_strip_trailing_whitespace (final );
7976
7985
return final ;
7977
7986
}
@@ -8024,7 +8033,7 @@ void passes_code_generator_CodeGenerator_gen_functions(passes_code_generator_Cod
8024
8033
ast_scopes_TemplateInstance * instance = std_vector_Iterator__9_cur (& __iter );
8025
8034
{
8026
8035
ast_scopes_Symbol * sym = instance -> resolved ;
8027
- ae_assert (sym -> type == ast_scopes_SymbolType_Function , "compiler/passes/code_generator.oc:943 :24: Assertion failed: `sym.type == Function`" , NULL ); ast_nodes_Function * func = sym -> u .func ;
8036
+ ae_assert (sym -> type == ast_scopes_SymbolType_Function , "compiler/passes/code_generator.oc:948 :24: Assertion failed: `sym.type == Function`" , NULL ); ast_nodes_Function * func = sym -> u .func ;
8028
8037
passes_code_generator_CodeGenerator_gen_function (this , func );
8029
8038
}
8030
8039
}
@@ -8060,7 +8069,7 @@ void passes_code_generator_CodeGenerator_gen_function_decls(passes_code_generato
8060
8069
ast_scopes_TemplateInstance * instance = std_vector_Iterator__9_cur (& __iter );
8061
8070
{
8062
8071
ast_scopes_Symbol * sym = instance -> resolved ;
8063
- ae_assert (sym -> type == ast_scopes_SymbolType_Function , "compiler/passes/code_generator.oc:970 :24: Assertion failed: `sym.type == Function`" , NULL ); ast_nodes_Function * func = sym -> u .func ;
8072
+ ae_assert (sym -> type == ast_scopes_SymbolType_Function , "compiler/passes/code_generator.oc:975 :24: Assertion failed: `sym.type == Function`" , NULL ); ast_nodes_Function * func = sym -> u .func ;
8064
8073
if (func -> is_dead )
8065
8074
continue ;
8066
8075
0 commit comments