www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19561] New: Enable array assignment & array ops in betterC

https://issues.dlang.org/show_bug.cgi?id=19561

          Issue ID: 19561
           Summary: Enable array assignment & array ops in betterC
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: n8sh.secondary hotmail.com

Assigning an array slice to another array slice works in betterC since
https://github.com/dlang/dmd/pull/7867 but other array operations do not.

Example of non-working code:
---
version (D_BetterC)
extern(C) void main()
{
    int[3] a, b;
    a[] = 0; // Works.
    a[] = b[]; // Works.
    a[] = 1; // error: undefined reference to '_memset32'
    a[] += 1; // Error: TypeInfo cannot be used with -betterC
    a[] += b[]; // Error: TypeInfo cannot be used with -betterC
}
---

--
Jan 08