Bogdan Romanyuk
7fbbeae617
value: handle lazy_align and lazy_size in writeToPackedMemory
2023-11-27 12:35:29 +00:00
Andrew Kelley
7103088e4a
Merge pull request #18105 from Vexu/translate-c
...
Use Aro's tokenizer in `translate-c`
2023-11-26 02:22:51 -05:00
Bogdan Romanyuk
2252dcc508
Compiler: move checking function-scope-only builtins to AstGen
2023-11-25 17:29:07 +00:00
Bogdan Romanyuk
bece97ef24
Sema: ensure tuple fields is resolved and fix internal out-of-bounds access
2023-11-25 14:05:51 +00:00
Tw
2fefc0b5c7
Zir: add missing extra index for linksection_or_addspace
...
Closes #18052
Closes #18104
Signed-off-by: Tw <tw19881113@gmail.com>
2023-11-25 11:39:37 +00:00
Veikka Tuominen
74010fecc7
translate-c: use Aro's tokenizer
2023-11-25 12:28:19 +02:00
Garrett
a277181c66
translate-c: use struct_init_one for empty struct initializer
2023-11-24 22:44:33 +00:00
Robin Voetter
28e1d82857
spirv: disable failing tests
2023-11-24 01:11:12 +01:00
Andrew Kelley
f4e426a06c
Merge pull request #18076 from ziglang/revert-iterable-dir
...
std.fs: Absorb `IterableDir` into `Dir`
2023-11-23 01:44:07 -05:00
Bogdan Romanyuk
aa31096cbd
Sema: disallow call to undefined function
2023-11-23 02:08:15 +00:00
Andrew Kelley
e357550610
update for the std.fs.Dir changes
2023-11-22 15:24:57 -07:00
Andrew Kelley
d5e21a4f1a
std: remove meta.trait
...
In general, I don't like the idea of std.meta.trait, and so I am
providing some guidance by deleting the entire namespace from the
standard library and compiler codebase.
My main criticism is that it's overcomplicated machinery that bloats
compile times and is ultimately unnecessary given the existence of Zig's
strong type system and reference traces.
Users who want this can create a third party package that provides this
functionality.
closes #18051
2023-11-22 13:24:27 -05:00
Andrew Kelley
54d196bb30
Merge pull request #18057 from Vexu/fixes
...
Fix bad error location on field init with field access
2023-11-21 15:12:03 -05:00
Andrew Kelley
be6f76655f
Merge pull request #18055 from ziglang/zig-init
2023-11-21 11:59:24 -05:00
Garrett
40b8c993f5
translate-c: skip blank macros when translating defines
2023-11-21 13:54:46 +00:00
Carl Ã…stholm
8bf4b3c611
translate-c: translate 80/128-bit long double literals
2023-11-21 14:14:01 +02:00
Veikka Tuominen
d63298da65
InternPool: handle funcZirBodyInst for func_coerced
...
Closes #18039
2023-11-21 13:59:14 +02:00
Veikka Tuominen
a947f97331
Sema: fix bad error location on field init with field access
...
Closes #14753
2023-11-21 13:59:14 +02:00
Bogdan Romanyuk
583afd6f0c
value: update isDeclRef for anonymous declarations
2023-11-21 13:21:32 +02:00
Andrew Kelley
9f363cd679
zig init: also create a build.zig.zon
2023-11-20 23:30:51 -07:00
Andrew Kelley
f645022d16
merge zig init-exe and zig init-lib into zig init
...
Instead of `zig init-lib` and `zig init-exe`, now there is only
`zig init`, which initializes any of the template files that do not
already exist, and makes a package that contains both an executable and
a static library. The idea is that the user can delete whatever they
don't want. In fact, I think even more things should be added to the
build.zig template.
2023-11-20 23:01:45 -07:00
mlugg
9cf6c1ad11
behavior: work around LLVM bug
...
See #18034
2023-11-19 11:11:50 +00:00
mlugg
ff838d8631
translate-c: work around unnecessary uses of 'var'
2023-11-19 11:11:50 +00:00
mlugg
3c585730f2
AstGen: preserve result type in comptime block
2023-11-19 11:11:50 +00:00
mlugg
38b373bf0b
cases: add compile error test for never-mutated local variable
2023-11-19 11:11:50 +00:00
mlugg
d82d327de2
test: update remaining code to fix 'var is never mutated' errors
2023-11-19 09:57:04 +00:00
mlugg
9c16b2370d
test: update behavior to silence 'var is never mutated' errors
2023-11-19 09:57:03 +00:00
mlugg
21fa187abc
test: update cases to silence 'var is never mutated' errors
2023-11-19 09:56:51 +00:00
mlugg
2c1acb6180
test: update translate-c tests to match new discard format
2023-11-19 09:55:07 +00:00
dweiller
325e0f5f0e
test: check compile errors when compilation has no errors
2023-11-19 00:12:43 +02:00
Curtis Tate Wilkinson
7b99189f19
Add struct declaration location to empty root struct field member error
2023-11-18 12:03:10 +00:00
David
673a1efa22
Sema: include sentinel in type of pointer-to-array ptr field
...
Resolves : #18007
2023-11-16 16:08:30 +00:00
Jakub Konka
b173088089
Merge pull request #18015 from ziglang/elf-tests
...
More ELF tests
2023-11-16 16:11:24 +01:00
David
941090d94f
Move duplicate field detection for struct init expressions into AstGen
...
Partially addresses #17916 .
2023-11-16 14:38:16 +00:00
Jakub Konka
85c0485fd9
elf: test -r mode does not create unneeded .eh_frame section
2023-11-16 10:54:39 +01:00
Jakub Konka
f6bf3353b1
elf: test -r mode with archive on the linker line
2023-11-16 10:51:21 +01:00
Krzysztof Wolicki
acf9de376d
Sema: Add error for non-power of 2 field alignment when reifying Unions, Structs, Pointers
2023-11-16 10:19:54 +02:00
kcbanner
53500a5768
sema: fixup underflows during struct / ptr array init when using -fstrip
2023-11-12 18:22:57 -05:00
Andrew Kelley
70d8baaec1
Revert "Sema: fix comparison with undefined"
...
This reverts commit 547481c31c8a538a7badbdce66d81820177ce87f.
There is a comment that did not get addressed with this patch, and the
required test cases are not added.
Reopens #17798 .
2023-11-12 14:33:17 -07:00
Bogdan Romanyuk
547481c31c
Sema: fix comparison with undefined
2023-11-12 11:03:23 +02:00
kcbanner
3fc6a2f113
sema: pass sema through if available for the array_type case in bitSizeAdvanced
2023-11-11 13:11:51 +00:00
Jacob Young
89cac88e91
behavior: add testing for LLVM SROA bugs
2023-11-10 18:04:09 -05:00
Jakub Konka
9ad03b628f
Merge pull request #17955 from ziglang/issue-17951
...
macho: handle special section/segment boundary symbols
2023-11-10 18:36:06 +01:00
Bogdan Romanyuk
ec934c6d32
disallow calling @trap at comptime
2023-11-10 18:39:42 +02:00
Jakub Konka
17177727c0
test/link: refactor common bits between ELF and MachO tests
2023-11-10 13:50:33 +01:00
Jakub Konka
7566a8fbd8
test/link: spawn ELF and MachO tests from the same root test/link/link.zig
2023-11-10 13:44:43 +01:00
Jakub Konka
c550eb3e8a
Merge pull request #17933 from ziglang/elf-r-mode
...
elf: the dreaded `-r` mode
2023-11-10 07:57:52 +01:00
mlugg
3f10b3ee1e
Sema: do not allow comptime-only pointer fields in packed structs
2023-11-10 06:51:48 +00:00
Jakub Konka
73fd4ed54b
test/link/elf: make .eh_frame relocatable test also verify COMDATs we emit
2023-11-09 23:22:47 +01:00
Jakub Konka
50f48022f0
test/link/elf: fix .eh_frame test
2023-11-09 14:51:00 +01:00