| author | |
| committer | |
| log | acebf05be9f1597affddab14eb2a1ecdbab67c73 |
| tree | 5b2fc570dced88cc929c36dbc79524938ac16d47 |
| parent | 145ddb81043dac46c204877a0260f1c06a7f35f9 |
8 files changed, 574 insertions(+), 36 deletions(-)
CMakeLists.txt+4-1| ... | @@ -817,9 +817,12 @@ set(BUILD_ZIG2_ARGS | ... | @@ -817,9 +817,12 @@ set(BUILD_ZIG2_ARGS |
| 817 | -OReleaseSmall | 817 | -OReleaseSmall |
| 818 | --name zig2 -femit-bin="${ZIG2_C_SOURCE}" | 818 | --name zig2 -femit-bin="${ZIG2_C_SOURCE}" |
| 819 | --mod "build_options::${ZIG_CONFIG_ZIG_OUT}" | 819 | --mod "build_options::${ZIG_CONFIG_ZIG_OUT}" |
| 820 | --mod "aro_options::src/stubs/aro_options.zig" | ||
| 820 | --mod "Builtins/Builtin.def::src/stubs/aro_builtins.zig" | 821 | --mod "Builtins/Builtin.def::src/stubs/aro_builtins.zig" |
| 821 | --mod "Attribute/names.def::src/stubs/aro_names.zig" | 822 | --mod "Attribute/names.def::src/stubs/aro_names.zig" |
| 822 | --mod "aro:Builtins/Builtin.def,Attribute/names.def:deps/aro/lib.zig" | 823 | --mod "Diagnostics/messages.def::src/stubs/aro_messages.zig" |
| 824 | --mod "aro_backend:build_options=aro_options:deps/aro/backend.zig" | ||
| 825 | --mod "aro:Builtins/Builtin.def,Attribute/names.def,Diagnostics/messages.def,build_options=aro_options,backend=aro_backend:deps/aro/aro.zig" | ||
| 823 | --deps build_options,aro | 826 | --deps build_options,aro |
| 824 | -target "${ZIG_HOST_TARGET_TRIPLE}" | 827 | -target "${ZIG_HOST_TARGET_TRIPLE}" |
| 825 | ) | 828 | ) |
bootstrap.c+4-1| ... | @@ -140,9 +140,12 @@ int main(int argc, char **argv) { | ... | @@ -140,9 +140,12 @@ int main(int argc, char **argv) { |
| 140 | "-ofmt=c", "-lc", "-OReleaseSmall", | 140 | "-ofmt=c", "-lc", "-OReleaseSmall", |
| 141 | "--name", "zig2", "-femit-bin=zig2.c", | 141 | "--name", "zig2", "-femit-bin=zig2.c", |
| 142 | "--mod", "build_options::config.zig", | 142 | "--mod", "build_options::config.zig", |
| 143 | "--mod", "aro_options::src/stubs/aro_options.zig", | ||
| 143 | "--mod", "Builtins/Builtin.def::src/stubs/aro_builtins.zig", | 144 | "--mod", "Builtins/Builtin.def::src/stubs/aro_builtins.zig", |
| 144 | "--mod", "Attribute/names.def::src/stubs/aro_names.zig", | 145 | "--mod", "Attribute/names.def::src/stubs/aro_names.zig", |
| 145 | "--mod", "aro:Builtins/Builtin.def,Attribute/names.def:deps/aro/lib.zig", | 146 | "--mod", "Diagnostics/messages.def::src/stubs/aro_messages.zig", |
| 147 | "--mod", "aro_backend:build_options=aro_options:deps/aro/backend.zig", | ||
| 148 | "--mod", "aro:Builtins/Builtin.def,Attribute/names.def,Diagnostics/messages.def,build_options=aro_options,backend=aro_backend:deps/aro/aro.zig", | ||
| 146 | "--deps", "build_options,aro", | 149 | "--deps", "build_options,aro", |
| 147 | "-target", host_triple, | 150 | "-target", host_triple, |
| 148 | NULL, | 151 | NULL, |
build.zig+25-3| ... | @@ -590,11 +590,33 @@ fn addCompilerStep( | ... | @@ -590,11 +590,33 @@ fn addCompilerStep( |
| 590 | .max_rss = 7_000_000_000, | 590 | .max_rss = 7_000_000_000, |
| 591 | }); | 591 | }); |
| 592 | exe.stack_size = stack_size; | 592 | exe.stack_size = stack_size; |
| 593 | |||
| 594 | const aro_options = b.addOptions(); | ||
| 595 | aro_options.addOption([]const u8, "version_str", "aro-zig"); | ||
| 596 | const aro_options_module = aro_options.createModule(); | ||
| 597 | const aro_backend = b.createModule(.{ | ||
| 598 | .source_file = .{ .path = "deps/aro/backend.zig" }, | ||
| 599 | .dependencies = &.{.{ | ||
| 600 | .name = "build_options", | ||
| 601 | .module = aro_options_module, | ||
| 602 | }}, | ||
| 603 | }); | ||
| 593 | const aro_module = b.createModule(.{ | 604 | const aro_module = b.createModule(.{ |
| 594 | .source_file = .{ .path = "deps/aro/lib.zig" }, | 605 | .source_file = .{ .path = "deps/aro/aro.zig" }, |
| 606 | .dependencies = &.{ | ||
| 607 | .{ | ||
| 608 | .name = "build_options", | ||
| 609 | .module = aro_options_module, | ||
| 610 | }, | ||
| 611 | .{ | ||
| 612 | .name = "backend", | ||
| 613 | .module = aro_backend, | ||
| 614 | }, | ||
| 615 | GenerateDef.create(b, .{ .name = "Builtins/Builtin.def", .src_prefix = "deps/aro/aro" }), | ||
| 616 | GenerateDef.create(b, .{ .name = "Attribute/names.def", .src_prefix = "deps/aro/aro" }), | ||
| 617 | GenerateDef.create(b, .{ .name = "Diagnostics/messages.def", .src_prefix = "deps/aro/aro", .kind = .named }), | ||
| 618 | }, | ||
| 595 | }); | 619 | }); |
| 596 | GenerateDef.add(b, "deps/aro/Builtins/Builtin.def", "Builtins/Builtin.def", exe, aro_module); | ||
| 597 | GenerateDef.add(b, "deps/aro/Attribute/names.def", "Attribute/names.def", exe, aro_module); | ||
| 598 | 620 | ||
| 599 | exe.addModule("aro", aro_module); | 621 | exe.addModule("aro", aro_module); |
| 600 | return exe; | 622 | return exe; |
src/aro_translate_c.zig+24-21| ... | @@ -21,8 +21,6 @@ const AliasList = common.AliasList; | ... | @@ -21,8 +21,6 @@ const AliasList = common.AliasList; |
| 21 | const ResultUsed = common.ResultUsed; | 21 | const ResultUsed = common.ResultUsed; |
| 22 | const Scope = common.ScopeExtra(Context, Type); | 22 | const Scope = common.ScopeExtra(Context, Type); |
| 23 | 23 | ||
| 24 | pub const Compilation = aro.Compilation; | ||
| 25 | |||
| 26 | const Context = struct { | 24 | const Context = struct { |
| 27 | gpa: mem.Allocator, | 25 | gpa: mem.Allocator, |
| 28 | arena: mem.Allocator, | 26 | arena: mem.Allocator, |
| ... | @@ -54,7 +52,7 @@ const Context = struct { | ... | @@ -54,7 +52,7 @@ const Context = struct { |
| 54 | 52 | ||
| 55 | pattern_list: translate_c.PatternList, | 53 | pattern_list: translate_c.PatternList, |
| 56 | tree: Tree, | 54 | tree: Tree, |
| 57 | comp: *Compilation, | 55 | comp: *aro.Compilation, |
| 58 | mapper: aro.TypeMapper, | 56 | mapper: aro.TypeMapper, |
| 59 | 57 | ||
| 60 | fn getMangle(c: *Context) u32 { | 58 | fn getMangle(c: *Context) u32 { |
| ... | @@ -108,7 +106,7 @@ fn warn(c: *Context, scope: *Scope, loc: TokenIndex, comptime format: []const u8 | ... | @@ -108,7 +106,7 @@ fn warn(c: *Context, scope: *Scope, loc: TokenIndex, comptime format: []const u8 |
| 108 | 106 | ||
| 109 | pub fn translate( | 107 | pub fn translate( |
| 110 | gpa: mem.Allocator, | 108 | gpa: mem.Allocator, |
| 111 | comp: *Compilation, | 109 | comp: *aro.Compilation, |
| 112 | args: []const []const u8, | 110 | args: []const []const u8, |
| 113 | ) !std.zig.Ast { | 111 | ) !std.zig.Ast { |
| 114 | try comp.addDefaultPragmaHandlers(); | 112 | try comp.addDefaultPragmaHandlers(); |
| ... | @@ -124,23 +122,18 @@ pub fn translate( | ... | @@ -124,23 +122,18 @@ pub fn translate( |
| 124 | assert(driver.inputs.items.len == 1); | 122 | assert(driver.inputs.items.len == 1); |
| 125 | const source = driver.inputs.items[0]; | 123 | const source = driver.inputs.items[0]; |
| 126 | 124 | ||
| 127 | const builtin = try comp.generateBuiltinMacros(); | 125 | const builtin_macros = try comp.generateBuiltinMacros(.include_system_defines); |
| 128 | const user_macros = try comp.addSourceFromBuffer("<command line>", macro_buf.items); | 126 | const user_macros = try comp.addSourceFromBuffer("<command line>", macro_buf.items); |
| 129 | 127 | ||
| 130 | var pp = aro.Preprocessor.init(comp); | 128 | var pp = try aro.Preprocessor.initDefault(comp); |
| 131 | defer pp.deinit(); | 129 | defer pp.deinit(); |
| 132 | 130 | ||
| 133 | try pp.addBuiltinMacros(); | 131 | try pp.preprocessSources(&.{ source, builtin_macros, user_macros }); |
| 134 | |||
| 135 | _ = try pp.preprocess(builtin); | ||
| 136 | _ = try pp.preprocess(user_macros); | ||
| 137 | const eof = try pp.preprocess(source); | ||
| 138 | try pp.tokens.append(pp.comp.gpa, eof); | ||
| 139 | 132 | ||
| 140 | var tree = try aro.Parser.parse(&pp); | 133 | var tree = try pp.parse(); |
| 141 | defer tree.deinit(); | 134 | defer tree.deinit(); |
| 142 | 135 | ||
| 143 | if (driver.comp.diag.errors != 0) { | 136 | if (driver.comp.diagnostics.errors != 0) { |
| 144 | return error.SemanticAnalyzeFail; | 137 | return error.SemanticAnalyzeFail; |
| 145 | } | 138 | } |
| 146 | 139 | ||
| ... | @@ -441,14 +434,11 @@ fn transEnumDecl(c: *Context, scope: *Scope, enum_decl: NodeIndex, field_nodes: | ... | @@ -441,14 +434,11 @@ fn transEnumDecl(c: *Context, scope: *Scope, enum_decl: NodeIndex, field_nodes: |
| 441 | }; | 434 | }; |
| 442 | 435 | ||
| 443 | const val = c.tree.value_map.get(field_node).?; | 436 | const val = c.tree.value_map.get(field_node).?; |
| 444 | const str = try std.fmt.allocPrint(c.arena, "{d}", .{val.data.int}); | ||
| 445 | const int = try ZigTag.integer_literal.create(c.arena, str); | ||
| 446 | |||
| 447 | const enum_const_def = try ZigTag.enum_constant.create(c.arena, .{ | 437 | const enum_const_def = try ZigTag.enum_constant.create(c.arena, .{ |
| 448 | .name = enum_val_name, | 438 | .name = enum_val_name, |
| 449 | .is_public = toplevel, | 439 | .is_public = toplevel, |
| 450 | .type = enum_const_type_node, | 440 | .type = enum_const_type_node, |
| 451 | .value = int, | 441 | .value = try transCreateNodeAPInt(c, val), |
| 452 | }); | 442 | }); |
| 453 | if (toplevel) | 443 | if (toplevel) |
| 454 | try addTopLevelDecl(c, enum_val_name, enum_const_def) | 444 | try addTopLevelDecl(c, enum_val_name, enum_const_def) |
| ... | @@ -565,7 +555,7 @@ fn transFnType( | ... | @@ -565,7 +555,7 @@ fn transFnType( |
| 565 | 555 | ||
| 566 | const linksection_string = blk: { | 556 | const linksection_string = blk: { |
| 567 | if (raw_ty.getAttribute(.section)) |section| { | 557 | if (raw_ty.getAttribute(.section)) |section| { |
| 568 | break :blk section.name.slice(c.tree.strings); | 558 | break :blk c.comp.interner.get(section.name.ref()).bytes; |
| 569 | } | 559 | } |
| 570 | break :blk null; | 560 | break :blk null; |
| 571 | }; | 561 | }; |
| ... | @@ -659,8 +649,7 @@ fn transExpr(c: *Context, node: NodeIndex, result_used: ResultUsed) TransError!Z | ... | @@ -659,8 +649,7 @@ fn transExpr(c: *Context, node: NodeIndex, result_used: ResultUsed) TransError!Z |
| 659 | const ty = c.tree.nodes.items(.ty)[@intFromEnum(node)]; | 649 | const ty = c.tree.nodes.items(.ty)[@intFromEnum(node)]; |
| 660 | if (c.tree.value_map.get(node)) |val| { | 650 | if (c.tree.value_map.get(node)) |val| { |
| 661 | // TODO handle other values | 651 | // TODO handle other values |
| 662 | const str = try std.fmt.allocPrint(c.arena, "{d}", .{val.data.int}); | 652 | const int = try transCreateNodeAPInt(c, val); |
| 663 | const int = try ZigTag.integer_literal.create(c.arena, str); | ||
| 664 | const as_node = try ZigTag.as.create(c.arena, .{ | 653 | const as_node = try ZigTag.as.create(c.arena, .{ |
| 665 | .lhs = try transType(c, undefined, ty, undefined), | 654 | .lhs = try transType(c, undefined, ty, undefined), |
| 666 | .rhs = int, | 655 | .rhs = int, |
| ... | @@ -673,3 +662,17 @@ fn transExpr(c: *Context, node: NodeIndex, result_used: ResultUsed) TransError!Z | ... | @@ -673,3 +662,17 @@ fn transExpr(c: *Context, node: NodeIndex, result_used: ResultUsed) TransError!Z |
| 673 | } | 662 | } |
| 674 | return .none; | 663 | return .none; |
| 675 | } | 664 | } |
| 665 | |||
| 666 | fn transCreateNodeAPInt(c: *Context, int: aro.Value) !ZigNode { | ||
| 667 | var space: aro.Interner.Tag.Int.BigIntSpace = undefined; | ||
| 668 | var big = int.toBigInt(&space, c.comp); | ||
| 669 | const is_negative = !big.positive; | ||
| 670 | big.positive = true; | ||
| 671 | |||
| 672 | const str = big.toStringAlloc(c.arena, 10, .lower) catch |err| switch (err) { | ||
| 673 | error.OutOfMemory => return error.OutOfMemory, | ||
| 674 | }; | ||
| 675 | const res = try ZigTag.integer_literal.create(c.arena, str); | ||
| 676 | if (is_negative) return ZigTag.negate.create(c.arena, res); | ||
| 677 | return res; | ||
| 678 | } |
src/main.zig+3-2| ... | @@ -4335,14 +4335,15 @@ fn cmdTranslateC(comp: *Compilation, arena: Allocator, fancy_output: ?*Compilati | ... | @@ -4335,14 +4335,15 @@ fn cmdTranslateC(comp: *Compilation, arena: Allocator, fancy_output: ?*Compilati |
| 4335 | 4335 | ||
| 4336 | var tree = switch (comp.c_frontend) { | 4336 | var tree = switch (comp.c_frontend) { |
| 4337 | .aro => tree: { | 4337 | .aro => tree: { |
| 4338 | const aro = @import("aro"); | ||
| 4338 | const translate_c = @import("aro_translate_c.zig"); | 4339 | const translate_c = @import("aro_translate_c.zig"); |
| 4339 | var aro_comp = translate_c.Compilation.init(comp.gpa); | 4340 | var aro_comp = aro.Compilation.init(comp.gpa); |
| 4340 | defer aro_comp.deinit(); | 4341 | defer aro_comp.deinit(); |
| 4341 | 4342 | ||
| 4342 | break :tree translate_c.translate(comp.gpa, &aro_comp, argv.items) catch |err| switch (err) { | 4343 | break :tree translate_c.translate(comp.gpa, &aro_comp, argv.items) catch |err| switch (err) { |
| 4343 | error.SemanticAnalyzeFail, error.FatalError => { | 4344 | error.SemanticAnalyzeFail, error.FatalError => { |
| 4344 | // TODO convert these to zig errors | 4345 | // TODO convert these to zig errors |
| 4345 | aro_comp.renderErrors(); | 4346 | aro.Diagnostics.render(&aro_comp, std.io.tty.detectConfig(std.io.getStdErr())); |
| 4346 | process.exit(1); | 4347 | process.exit(1); |
| 4347 | }, | 4348 | }, |
| 4348 | error.OutOfMemory => return error.OutOfMemory, | 4349 | error.OutOfMemory => return error.OutOfMemory, |
src/mingw.zig+5-8| ... | @@ -357,9 +357,9 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void { | ... | @@ -357,9 +357,9 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void { |
| 357 | nosuspend stderr.print("output path: {s}\n", .{def_final_path}) catch break :print; | 357 | nosuspend stderr.print("output path: {s}\n", .{def_final_path}) catch break :print; |
| 358 | } | 358 | } |
| 359 | 359 | ||
| 360 | try aro_comp.include_dirs.append(include_dir); | 360 | try aro_comp.include_dirs.append(comp.gpa, include_dir); |
| 361 | 361 | ||
| 362 | const builtin_macros = try aro_comp.generateBuiltinMacros(); | 362 | const builtin_macros = try aro_comp.generateBuiltinMacros(.include_system_defines); |
| 363 | const user_macros = try aro_comp.addSourceFromBuffer("<command line>", target_defines); | 363 | const user_macros = try aro_comp.addSourceFromBuffer("<command line>", target_defines); |
| 364 | const def_file_source = try aro_comp.addSourceFromPath(def_file_path); | 364 | const def_file_source = try aro_comp.addSourceFromPath(def_file_path); |
| 365 | 365 | ||
| ... | @@ -368,14 +368,11 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void { | ... | @@ -368,14 +368,11 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void { |
| 368 | pp.linemarkers = .none; | 368 | pp.linemarkers = .none; |
| 369 | pp.preserve_whitespace = true; | 369 | pp.preserve_whitespace = true; |
| 370 | 370 | ||
| 371 | _ = try pp.preprocess(builtin_macros); | 371 | try pp.preprocessSources(&.{ def_file_source, builtin_macros, user_macros }); |
| 372 | _ = try pp.preprocess(user_macros); | ||
| 373 | const eof = try pp.preprocess(def_file_source); | ||
| 374 | try pp.tokens.append(pp.comp.gpa, eof); | ||
| 375 | 372 | ||
| 376 | for (aro_comp.diag.list.items) |diagnostic| { | 373 | for (aro_comp.diagnostics.list.items) |diagnostic| { |
| 377 | if (diagnostic.kind == .@"fatal error" or diagnostic.kind == .@"error") { | 374 | if (diagnostic.kind == .@"fatal error" or diagnostic.kind == .@"error") { |
| 378 | aro_comp.renderErrors(); | 375 | aro.Diagnostics.render(&aro_comp, std.io.tty.detectConfig(std.io.getStdErr())); |
| 379 | return error.AroPreprocessorFailed; | 376 | return error.AroPreprocessorFailed; |
| 380 | } | 377 | } |
| 381 | } | 378 | } |
src/stubs/aro_messages.zig created+508| ... | @@ -0,0 +1,508 @@ | ||
| 1 | //! Stub implementation only used when bootstrapping stage2 | ||
| 2 | //! Keep in sync with deps/aro/build/GenerateDef.zig | ||
| 3 | |||
| 4 | pub fn with(comptime Properties: type) type { | ||
| 5 | return struct { | ||
| 6 | pub const Tag = enum { | ||
| 7 | todo, | ||
| 8 | error_directive, | ||
| 9 | warning_directive, | ||
| 10 | elif_without_if, | ||
| 11 | elif_after_else, | ||
| 12 | elifdef_without_if, | ||
| 13 | elifdef_after_else, | ||
| 14 | elifndef_without_if, | ||
| 15 | elifndef_after_else, | ||
| 16 | else_without_if, | ||
| 17 | else_after_else, | ||
| 18 | endif_without_if, | ||
| 19 | unknown_pragma, | ||
| 20 | line_simple_digit, | ||
| 21 | line_invalid_filename, | ||
| 22 | unterminated_conditional_directive, | ||
| 23 | invalid_preprocessing_directive, | ||
| 24 | macro_name_missing, | ||
| 25 | extra_tokens_directive_end, | ||
| 26 | expected_value_in_expr, | ||
| 27 | closing_paren, | ||
| 28 | to_match_paren, | ||
| 29 | to_match_brace, | ||
| 30 | to_match_bracket, | ||
| 31 | header_str_closing, | ||
| 32 | header_str_match, | ||
| 33 | string_literal_in_pp_expr, | ||
| 34 | float_literal_in_pp_expr, | ||
| 35 | defined_as_macro_name, | ||
| 36 | macro_name_must_be_identifier, | ||
| 37 | whitespace_after_macro_name, | ||
| 38 | hash_hash_at_start, | ||
| 39 | hash_hash_at_end, | ||
| 40 | pasting_formed_invalid, | ||
| 41 | missing_paren_param_list, | ||
| 42 | unterminated_macro_param_list, | ||
| 43 | invalid_token_param_list, | ||
| 44 | expected_comma_param_list, | ||
| 45 | hash_not_followed_param, | ||
| 46 | expected_filename, | ||
| 47 | empty_filename, | ||
| 48 | expected_invalid, | ||
| 49 | expected_eof, | ||
| 50 | expected_token, | ||
| 51 | expected_expr, | ||
| 52 | expected_integer_constant_expr, | ||
| 53 | missing_type_specifier, | ||
| 54 | missing_type_specifier_c23, | ||
| 55 | multiple_storage_class, | ||
| 56 | static_assert_failure, | ||
| 57 | static_assert_failure_message, | ||
| 58 | expected_type, | ||
| 59 | cannot_combine_spec, | ||
| 60 | duplicate_decl_spec, | ||
| 61 | restrict_non_pointer, | ||
| 62 | expected_external_decl, | ||
| 63 | expected_ident_or_l_paren, | ||
| 64 | missing_declaration, | ||
| 65 | func_not_in_root, | ||
| 66 | illegal_initializer, | ||
| 67 | extern_initializer, | ||
| 68 | spec_from_typedef, | ||
| 69 | param_before_var_args, | ||
| 70 | void_only_param, | ||
| 71 | void_param_qualified, | ||
| 72 | void_must_be_first_param, | ||
| 73 | invalid_storage_on_param, | ||
| 74 | threadlocal_non_var, | ||
| 75 | func_spec_non_func, | ||
| 76 | illegal_storage_on_func, | ||
| 77 | illegal_storage_on_global, | ||
| 78 | expected_stmt, | ||
| 79 | func_cannot_return_func, | ||
| 80 | func_cannot_return_array, | ||
| 81 | undeclared_identifier, | ||
| 82 | not_callable, | ||
| 83 | unsupported_str_cat, | ||
| 84 | static_func_not_global, | ||
| 85 | implicit_func_decl, | ||
| 86 | unknown_builtin, | ||
| 87 | implicit_builtin, | ||
| 88 | implicit_builtin_header_note, | ||
| 89 | expected_param_decl, | ||
| 90 | invalid_old_style_params, | ||
| 91 | expected_fn_body, | ||
| 92 | invalid_void_param, | ||
| 93 | unused_value, | ||
| 94 | continue_not_in_loop, | ||
| 95 | break_not_in_loop_or_switch, | ||
| 96 | unreachable_code, | ||
| 97 | duplicate_label, | ||
| 98 | previous_label, | ||
| 99 | undeclared_label, | ||
| 100 | case_not_in_switch, | ||
| 101 | duplicate_switch_case, | ||
| 102 | multiple_default, | ||
| 103 | previous_case, | ||
| 104 | expected_arguments, | ||
| 105 | expected_arguments_old, | ||
| 106 | expected_at_least_arguments, | ||
| 107 | invalid_static_star, | ||
| 108 | static_non_param, | ||
| 109 | array_qualifiers, | ||
| 110 | star_non_param, | ||
| 111 | variable_len_array_file_scope, | ||
| 112 | useless_static, | ||
| 113 | negative_array_size, | ||
| 114 | array_incomplete_elem, | ||
| 115 | array_func_elem, | ||
| 116 | static_non_outermost_array, | ||
| 117 | qualifier_non_outermost_array, | ||
| 118 | unterminated_macro_arg_list, | ||
| 119 | unknown_warning, | ||
| 120 | overflow, | ||
| 121 | int_literal_too_big, | ||
| 122 | indirection_ptr, | ||
| 123 | addr_of_rvalue, | ||
| 124 | addr_of_bitfield, | ||
| 125 | not_assignable, | ||
| 126 | ident_or_l_brace, | ||
| 127 | empty_enum, | ||
| 128 | redefinition, | ||
| 129 | previous_definition, | ||
| 130 | expected_identifier, | ||
| 131 | expected_str_literal, | ||
| 132 | expected_str_literal_in, | ||
| 133 | parameter_missing, | ||
| 134 | empty_record, | ||
| 135 | empty_record_size, | ||
| 136 | wrong_tag, | ||
| 137 | expected_parens_around_typename, | ||
| 138 | alignof_expr, | ||
| 139 | invalid_alignof, | ||
| 140 | invalid_sizeof, | ||
| 141 | macro_redefined, | ||
| 142 | generic_qual_type, | ||
| 143 | generic_array_type, | ||
| 144 | generic_func_type, | ||
| 145 | generic_duplicate, | ||
| 146 | generic_duplicate_here, | ||
| 147 | generic_duplicate_default, | ||
| 148 | generic_no_match, | ||
| 149 | escape_sequence_overflow, | ||
| 150 | invalid_universal_character, | ||
| 151 | incomplete_universal_character, | ||
| 152 | multichar_literal_warning, | ||
| 153 | invalid_multichar_literal, | ||
| 154 | wide_multichar_literal, | ||
| 155 | char_lit_too_wide, | ||
| 156 | char_too_large, | ||
| 157 | must_use_struct, | ||
| 158 | must_use_union, | ||
| 159 | must_use_enum, | ||
| 160 | redefinition_different_sym, | ||
| 161 | redefinition_incompatible, | ||
| 162 | redefinition_of_parameter, | ||
| 163 | invalid_bin_types, | ||
| 164 | comparison_ptr_int, | ||
| 165 | comparison_distinct_ptr, | ||
| 166 | incompatible_pointers, | ||
| 167 | invalid_argument_un, | ||
| 168 | incompatible_assign, | ||
| 169 | implicit_ptr_to_int, | ||
| 170 | invalid_cast_to_float, | ||
| 171 | invalid_cast_to_pointer, | ||
| 172 | invalid_cast_type, | ||
| 173 | qual_cast, | ||
| 174 | invalid_index, | ||
| 175 | invalid_subscript, | ||
| 176 | array_after, | ||
| 177 | array_before, | ||
| 178 | statement_int, | ||
| 179 | statement_scalar, | ||
| 180 | func_should_return, | ||
| 181 | incompatible_return, | ||
| 182 | incompatible_return_sign, | ||
| 183 | implicit_int_to_ptr, | ||
| 184 | func_does_not_return, | ||
| 185 | void_func_returns_value, | ||
| 186 | incompatible_arg, | ||
| 187 | incompatible_ptr_arg, | ||
| 188 | incompatible_ptr_arg_sign, | ||
| 189 | parameter_here, | ||
| 190 | atomic_array, | ||
| 191 | atomic_func, | ||
| 192 | atomic_incomplete, | ||
| 193 | addr_of_register, | ||
| 194 | variable_incomplete_ty, | ||
| 195 | parameter_incomplete_ty, | ||
| 196 | tentative_array, | ||
| 197 | deref_incomplete_ty_ptr, | ||
| 198 | alignas_on_func, | ||
| 199 | alignas_on_param, | ||
| 200 | minimum_alignment, | ||
| 201 | maximum_alignment, | ||
| 202 | negative_alignment, | ||
| 203 | align_ignored, | ||
| 204 | zero_align_ignored, | ||
| 205 | non_pow2_align, | ||
| 206 | pointer_mismatch, | ||
| 207 | static_assert_not_constant, | ||
| 208 | static_assert_missing_message, | ||
| 209 | pre_c23_compat, | ||
| 210 | unbound_vla, | ||
| 211 | array_too_large, | ||
| 212 | incompatible_ptr_init, | ||
| 213 | incompatible_ptr_init_sign, | ||
| 214 | incompatible_ptr_assign, | ||
| 215 | incompatible_ptr_assign_sign, | ||
| 216 | vla_init, | ||
| 217 | func_init, | ||
| 218 | incompatible_init, | ||
| 219 | empty_scalar_init, | ||
| 220 | excess_scalar_init, | ||
| 221 | excess_str_init, | ||
| 222 | excess_struct_init, | ||
| 223 | excess_array_init, | ||
| 224 | str_init_too_long, | ||
| 225 | arr_init_too_long, | ||
| 226 | invalid_typeof, | ||
| 227 | division_by_zero, | ||
| 228 | division_by_zero_macro, | ||
| 229 | builtin_choose_cond, | ||
| 230 | alignas_unavailable, | ||
| 231 | case_val_unavailable, | ||
| 232 | enum_val_unavailable, | ||
| 233 | incompatible_array_init, | ||
| 234 | array_init_str, | ||
| 235 | initializer_overrides, | ||
| 236 | previous_initializer, | ||
| 237 | invalid_array_designator, | ||
| 238 | negative_array_designator, | ||
| 239 | oob_array_designator, | ||
| 240 | invalid_field_designator, | ||
| 241 | no_such_field_designator, | ||
| 242 | empty_aggregate_init_braces, | ||
| 243 | ptr_init_discards_quals, | ||
| 244 | ptr_assign_discards_quals, | ||
| 245 | ptr_ret_discards_quals, | ||
| 246 | ptr_arg_discards_quals, | ||
| 247 | unknown_attribute, | ||
| 248 | ignored_attribute, | ||
| 249 | invalid_fallthrough, | ||
| 250 | cannot_apply_attribute_to_statement, | ||
| 251 | builtin_macro_redefined, | ||
| 252 | feature_check_requires_identifier, | ||
| 253 | missing_tok_builtin, | ||
| 254 | gnu_label_as_value, | ||
| 255 | expected_record_ty, | ||
| 256 | member_expr_not_ptr, | ||
| 257 | member_expr_ptr, | ||
| 258 | no_such_member, | ||
| 259 | malformed_warning_check, | ||
| 260 | invalid_computed_goto, | ||
| 261 | pragma_warning_message, | ||
| 262 | pragma_error_message, | ||
| 263 | pragma_message, | ||
| 264 | pragma_requires_string_literal, | ||
| 265 | poisoned_identifier, | ||
| 266 | pragma_poison_identifier, | ||
| 267 | pragma_poison_macro, | ||
| 268 | newline_eof, | ||
| 269 | empty_translation_unit, | ||
| 270 | omitting_parameter_name, | ||
| 271 | non_int_bitfield, | ||
| 272 | negative_bitwidth, | ||
| 273 | zero_width_named_field, | ||
| 274 | bitfield_too_big, | ||
| 275 | invalid_utf8, | ||
| 276 | implicitly_unsigned_literal, | ||
| 277 | invalid_preproc_operator, | ||
| 278 | invalid_preproc_expr_start, | ||
| 279 | c99_compat, | ||
| 280 | unexpected_character, | ||
| 281 | invalid_identifier_start_char, | ||
| 282 | unicode_zero_width, | ||
| 283 | unicode_homoglyph, | ||
| 284 | meaningless_asm_qual, | ||
| 285 | duplicate_asm_qual, | ||
| 286 | invalid_asm_str, | ||
| 287 | dollar_in_identifier_extension, | ||
| 288 | dollars_in_identifiers, | ||
| 289 | expanded_from_here, | ||
| 290 | skipping_macro_backtrace, | ||
| 291 | pragma_operator_string_literal, | ||
| 292 | unknown_gcc_pragma, | ||
| 293 | unknown_gcc_pragma_directive, | ||
| 294 | predefined_top_level, | ||
| 295 | incompatible_va_arg, | ||
| 296 | too_many_scalar_init_braces, | ||
| 297 | uninitialized_in_own_init, | ||
| 298 | gnu_statement_expression, | ||
| 299 | stmt_expr_not_allowed_file_scope, | ||
| 300 | gnu_imaginary_constant, | ||
| 301 | plain_complex, | ||
| 302 | complex_int, | ||
| 303 | qual_on_ret_type, | ||
| 304 | cli_invalid_standard, | ||
| 305 | cli_invalid_target, | ||
| 306 | cli_invalid_emulate, | ||
| 307 | cli_unknown_arg, | ||
| 308 | cli_error, | ||
| 309 | cli_unused_link_object, | ||
| 310 | cli_unknown_linker, | ||
| 311 | extra_semi, | ||
| 312 | func_field, | ||
| 313 | vla_field, | ||
| 314 | field_incomplete_ty, | ||
| 315 | flexible_in_union, | ||
| 316 | flexible_non_final, | ||
| 317 | flexible_in_empty, | ||
| 318 | duplicate_member, | ||
| 319 | binary_integer_literal, | ||
| 320 | gnu_va_macro, | ||
| 321 | builtin_must_be_called, | ||
| 322 | va_start_not_in_func, | ||
| 323 | va_start_fixed_args, | ||
| 324 | va_start_not_last_param, | ||
| 325 | attribute_not_enough_args, | ||
| 326 | attribute_too_many_args, | ||
| 327 | attribute_arg_invalid, | ||
| 328 | unknown_attr_enum, | ||
| 329 | attribute_requires_identifier, | ||
| 330 | declspec_not_enabled, | ||
| 331 | declspec_attr_not_supported, | ||
| 332 | deprecated_declarations, | ||
| 333 | deprecated_note, | ||
| 334 | unavailable, | ||
| 335 | unavailable_note, | ||
| 336 | warning_attribute, | ||
| 337 | error_attribute, | ||
| 338 | ignored_record_attr, | ||
| 339 | backslash_newline_escape, | ||
| 340 | array_size_non_int, | ||
| 341 | cast_to_smaller_int, | ||
| 342 | gnu_switch_range, | ||
| 343 | empty_case_range, | ||
| 344 | non_standard_escape_char, | ||
| 345 | invalid_pp_stringify_escape, | ||
| 346 | vla, | ||
| 347 | float_overflow_conversion, | ||
| 348 | float_out_of_range, | ||
| 349 | float_zero_conversion, | ||
| 350 | float_value_changed, | ||
| 351 | float_to_int, | ||
| 352 | const_decl_folded, | ||
| 353 | const_decl_folded_vla, | ||
| 354 | redefinition_of_typedef, | ||
| 355 | undefined_macro, | ||
| 356 | fn_macro_undefined, | ||
| 357 | preprocessing_directive_only, | ||
| 358 | missing_lparen_after_builtin, | ||
| 359 | offsetof_ty, | ||
| 360 | offsetof_incomplete, | ||
| 361 | offsetof_array, | ||
| 362 | pragma_pack_lparen, | ||
| 363 | pragma_pack_rparen, | ||
| 364 | pragma_pack_unknown_action, | ||
| 365 | pragma_pack_show, | ||
| 366 | pragma_pack_int, | ||
| 367 | pragma_pack_int_ident, | ||
| 368 | pragma_pack_undefined_pop, | ||
| 369 | pragma_pack_empty_stack, | ||
| 370 | cond_expr_type, | ||
| 371 | too_many_includes, | ||
| 372 | enumerator_too_small, | ||
| 373 | enumerator_too_large, | ||
| 374 | include_next, | ||
| 375 | include_next_outside_header, | ||
| 376 | enumerator_overflow, | ||
| 377 | enum_not_representable, | ||
| 378 | enum_too_large, | ||
| 379 | enum_fixed, | ||
| 380 | enum_prev_nonfixed, | ||
| 381 | enum_prev_fixed, | ||
| 382 | enum_different_explicit_ty, | ||
| 383 | enum_not_representable_fixed, | ||
| 384 | transparent_union_wrong_type, | ||
| 385 | transparent_union_one_field, | ||
| 386 | transparent_union_size, | ||
| 387 | transparent_union_size_note, | ||
| 388 | designated_init_invalid, | ||
| 389 | designated_init_needed, | ||
| 390 | ignore_common, | ||
| 391 | ignore_nocommon, | ||
| 392 | non_string_ignored, | ||
| 393 | local_variable_attribute, | ||
| 394 | ignore_cold, | ||
| 395 | ignore_hot, | ||
| 396 | ignore_noinline, | ||
| 397 | ignore_always_inline, | ||
| 398 | invalid_noreturn, | ||
| 399 | nodiscard_unused, | ||
| 400 | warn_unused_result, | ||
| 401 | invalid_vec_elem_ty, | ||
| 402 | vec_size_not_multiple, | ||
| 403 | invalid_imag, | ||
| 404 | invalid_real, | ||
| 405 | zero_length_array, | ||
| 406 | old_style_flexible_struct, | ||
| 407 | comma_deletion_va_args, | ||
| 408 | main_return_type, | ||
| 409 | expansion_to_defined, | ||
| 410 | invalid_int_suffix, | ||
| 411 | invalid_float_suffix, | ||
| 412 | invalid_octal_digit, | ||
| 413 | invalid_binary_digit, | ||
| 414 | exponent_has_no_digits, | ||
| 415 | hex_floating_constant_requires_exponent, | ||
| 416 | sizeof_returns_zero, | ||
| 417 | declspec_not_allowed_after_declarator, | ||
| 418 | declarator_name_tok, | ||
| 419 | type_not_supported_on_target, | ||
| 420 | bit_int, | ||
| 421 | unsigned_bit_int_too_small, | ||
| 422 | signed_bit_int_too_small, | ||
| 423 | bit_int_too_big, | ||
| 424 | keyword_macro, | ||
| 425 | ptr_arithmetic_incomplete, | ||
| 426 | callconv_not_supported, | ||
| 427 | pointer_arith_void, | ||
| 428 | sizeof_array_arg, | ||
| 429 | array_address_to_bool, | ||
| 430 | string_literal_to_bool, | ||
| 431 | constant_expression_conversion_not_allowed, | ||
| 432 | invalid_object_cast, | ||
| 433 | cli_invalid_fp_eval_method, | ||
| 434 | suggest_pointer_for_invalid_fp16, | ||
| 435 | bitint_suffix, | ||
| 436 | auto_type_extension, | ||
| 437 | auto_type_not_allowed, | ||
| 438 | auto_type_requires_initializer, | ||
| 439 | auto_type_requires_single_declarator, | ||
| 440 | auto_type_requires_plain_declarator, | ||
| 441 | invalid_cast_to_auto_type, | ||
| 442 | auto_type_from_bitfield, | ||
| 443 | array_of_auto_type, | ||
| 444 | auto_type_with_init_list, | ||
| 445 | missing_semicolon, | ||
| 446 | tentative_definition_incomplete, | ||
| 447 | forward_declaration_here, | ||
| 448 | gnu_union_cast, | ||
| 449 | invalid_union_cast, | ||
| 450 | cast_to_incomplete_type, | ||
| 451 | invalid_source_epoch, | ||
| 452 | fuse_ld_path, | ||
| 453 | invalid_rtlib, | ||
| 454 | unsupported_rtlib_gcc, | ||
| 455 | invalid_unwindlib, | ||
| 456 | incompatible_unwindlib, | ||
| 457 | gnu_asm_disabled, | ||
| 458 | extension_token_used, | ||
| 459 | complex_component_init, | ||
| 460 | complex_prefix_postfix_op, | ||
| 461 | not_floating_type, | ||
| 462 | argument_types_differ, | ||
| 463 | ms_search_rule, | ||
| 464 | ctrl_z_eof, | ||
| 465 | illegal_char_encoding_warning, | ||
| 466 | illegal_char_encoding_error, | ||
| 467 | ucn_basic_char_error, | ||
| 468 | ucn_basic_char_warning, | ||
| 469 | ucn_control_char_error, | ||
| 470 | ucn_control_char_warning, | ||
| 471 | c89_ucn_in_literal, | ||
| 472 | four_char_char_literal, | ||
| 473 | multi_char_char_literal, | ||
| 474 | missing_hex_escape, | ||
| 475 | unknown_escape_sequence, | ||
| 476 | attribute_requires_string, | ||
| 477 | unterminated_string_literal_warning, | ||
| 478 | unterminated_string_literal_error, | ||
| 479 | empty_char_literal_warning, | ||
| 480 | empty_char_literal_error, | ||
| 481 | unterminated_char_literal_warning, | ||
| 482 | unterminated_char_literal_error, | ||
| 483 | unterminated_comment, | ||
| 484 | def_no_proto_deprecated, | ||
| 485 | passing_args_to_kr, | ||
| 486 | unknown_type_name, | ||
| 487 | label_compound_end, | ||
| 488 | u8_char_lit, | ||
| 489 | malformed_embed_param, | ||
| 490 | malformed_embed_limit, | ||
| 491 | duplicate_embed_param, | ||
| 492 | unsupported_embed_param, | ||
| 493 | invalid_compound_literal_storage_class, | ||
| 494 | va_opt_lparen, | ||
| 495 | va_opt_rparen, | ||
| 496 | attribute_int_out_of_range, | ||
| 497 | identifier_not_normalized, | ||
| 498 | c23_auto_plain_declarator, | ||
| 499 | c23_auto_single_declarator, | ||
| 500 | c32_auto_requires_initializer, | ||
| 501 | c23_auto_scalar_init, | ||
| 502 | |||
| 503 | pub fn property(_: Tag) Properties { | ||
| 504 | return undefined; | ||
| 505 | } | ||
| 506 | }; | ||
| 507 | }; | ||
| 508 | } | ||
src/stubs/aro_options.zig created+1| ... | @@ -0,0 +1 @@ | ||
| 1 | pub const version_str: []const u8 = "bootstrap-stub"; | ||