0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/test
Evan Haas dc4fa83dd7
translate-c: add framework for special-casing macros
Some macros (for example any macro that uses token pasting) cannot be
directly translated to Zig, but may nevertheless still admit a Zig
implementation. This provides a mechanism for matching macros against
templates and mapping them to functions implemented in c_translation.zig.

A macro matches a template if it contains the same sequence of tokens, except
that the name and parameters may be renamed. No attempt is made to
semantically analyze the macro. For example the following two macros are
considered equivalent:

```C
```

But the following two are not:

```C
```
History 2021-07-22 08:09:46 -07:00
..
behavior Fix "unused local constant" error 2021-07-15 20:56:24 -04: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: disable wasm switch test case for now 2021-07-20 19:01:19 -07:00
standalone cleanups related to unused params 2021-06-21 17:03:04 -07:00
assemble_and_link.zig update std lib to new Target API 2020-02-28 14:51:54 -05:00
behavior.zig tagName: return a null-terminated slice 2021-06-16 22:02:42 +01:00
cases.zig Merge pull request #9352 from g-w1/fix-9346 2021-07-11 15:11:28 -04:00
cli.zig update godbolt test case for unused parameter 2021-06-23 10:44:46 -07:00
compare_output.zig fix unused parameters in compare_output test cases 2021-06-23 10:44:46 -07:00
compile_errors.zig stage2 astgen: error for return outside of function scope 2021-07-11 10:03:35 -04:00
gen_h.zig run zig fmt on src/ and test/ 2020-10-31 12:21:49 +02:00
run_translated_c.zig translate-c: Handle underscore when used as an identifier 2021-07-19 12:56:23 +03:00
runtime_safety.zig fix unused variable errors in runtime safety test cases 2021-06-23 10:44:46 -07:00
stack_traces.zig overhaul elf csu (c-runtime startup) logic 2021-05-23 15:38:57 -04:00
standalone.zig std: Fix PIE startup sequence 2021-06-19 18:02:51 +02:00
tests.zig avoid calling into stage1 backend when AstGen fails 2021-07-02 13:27:28 -07:00
translate_c.zig translate-c: add framework for special-casing macros 2021-07-22 08:09:46 -07:00