9 Commits

Author SHA1 Message Date
Parker Liu
0bdc0bb534
translate-c: fix referencing extern locals from nested blocks 2025-03-31 20:22:03 +03:00
Linus Groh
a84951465b translate-c: Use mangled name for local extern in condition/loop 2024-07-28 02:58:49 +03:00
Hayden Riddiford
20563d8457 - Added special handling for translating C extern variables declared within scoped blocks
- Added test/cases/run_translated_c/extern_typedef_variables_in_functions.c to test for issue 19687
2024-07-16 23:29:44 +03:00
Devin J. Pohly
ffb1a6d9a7 translate-c: fix translation of "ptr += uint"
The right-hand side was incorrectly cast to a pointer, since only signed
ints were being interpreted correctly as pointer arithmetic.

Fixes #20285.
2024-06-15 18:19:33 +02:00
february cozzocrea
b2427ea7d8 test manifest key checking and other fixes
This commit adds several fixes and improvements for the Zig compiler
test harness.

1. -Dskip-translate-c option added for skipping the translate-c tests.
2. translate-c/run-translated-c tests in test/cases/* have been added to
   the steps test-translate-c and test-run-translated-c. Closes #18224.
3. Custom name added to the CheckFile step for the translate-c step to
   better communicate which test failed.
4. Test manifest key validation added to return an error if a manifest
   contains an invalid key.
2024-03-08 02:59:45 -08:00
february cozzocrea
da506aaf6e
translate-c: Explicit cast bool from float fix 2024-01-16 18:12:05 +02:00
february cozzocrea
50457482b1
translate-c: Fix for compound assign implicit cast error 2024-01-16 17:57:31 +02:00
february cozzocrea
aafff25897
translate-c: float cast from boolean expr fix 2024-01-10 19:13:11 +00:00
Veikka Tuominen
e765495b11 tests: translate-c and run-translated-c to the test harness 2023-10-17 11:55:17 +03:00