Bug 24237 – BetterC: equality of static arrays fails in betterC

Status
NEW
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-11-09T23:43:55Z
Last change time
2024-12-13T19:31:42Z
Keywords
betterC, rejects-valid
Assigned to
No Owner
Creator
dave287091
Moved to GitHub: dmd#18197 →

Comments

Comment #0 by dave287091 — 2023-11-09T23:43:55Z
This program fails to compile: struct Foo { int x; } extern(C) int main(){ Foo fa, fb; int x = fa == fb; Foo[2] a, b; x += a == b; // Error: expression `a == b` uses the GC and cannot be used with switch `-betterC` return x; } This should just work, and the idea that `a == b` uses the GC is ridiculous.
Comment #1 by robert.schadek — 2024-12-13T19:31:42Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18197 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB