zig/test
Evan Haas ea4a25287e translate-c: better support for static local variables
Don't move static local variables into the top-level scope since this
can cause name clashes if subsequently-defined variables or parameters
in different scopes share the name.

Instead, use a variable within a struct so that the variable's lexical
scope does not change. This solution was suggested by @LemonBoy

Note that a similar name-shadowing problem exists with `extern` variables
declared within block scope, but a different solution will be needed since
they do need to be moved to the top-level scope and we can't rename them.
2021-06-12 23:12:37 +03:00
..
behavior Renamed @byteOffsetOf to @offsetOf 2021-06-12 19:16:01 +03:00
src std.build: don't default to static linkage 2021-06-12 14:23:07 +03:00
stage1/c_abi stage1: Fix handling of C ABI parameters split in multiple regs 2021-06-10 12:50:25 -04:00
stage2 stage2: compile error for ambiguous decl refrences 2021-06-08 18:13:12 -04:00
standalone Merge pull request #7959 from MasterQ32/build_rewrite 2021-06-11 19:13:14 +03:00
assemble_and_link.zig
behavior.zig zig fmt 2021-06-10 20:13:43 -07:00
cli.zig std: @import("builtin").StackTrace -> std.builtin.StackTrace 2021-05-17 14:36:51 -07:00
compare_output.zig Add a logging allocator that uses std.log (#8511) 2021-06-09 21:42:07 +03:00
compile_errors.zig Renamed @byteOffsetOf to @offsetOf 2021-06-12 19:16:01 +03:00
gen_h.zig
run_translated_c.zig translate-c: better support for static local variables 2021-06-12 23:12:37 +03:00
runtime_safety.zig update langref, compile-error tests, safety tests 2021-05-17 15:25:27 -07:00
stack_traces.zig overhaul elf csu (c-runtime startup) logic 2021-05-23 15:38:57 -04:00
standalone.zig Add standalone test for common symbols 2021-06-10 19:51:41 +02:00
tests.zig std.build: don't default to static linkage 2021-06-12 14:23:07 +03:00
translate_c.zig translate-c: better support for static local variables 2021-06-12 23:12:37 +03:00