Issue 23606 - betterC with CTFE and gc
Summary: betterC with CTFE and gc
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P3 normal
Assignee: No Owner
URL:
Keywords: betterC, pull
Depends on:
Blocks:
 
Reported: 2023-01-08 06:28 UTC by Walter Bright
Modified: 2023-01-16 21:04 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Walter Bright 2023-01-08 06:28:13 UTC
From Max Samukha:

Simple test cases still don't compile:

string foo()()
{
    string a, b;
    return a ~ b;
}

enum s = foo();

./dmd -c -betterC test.d
test.d(4): Error: array concatenation of expression `a ~ b` requires the GC which is not available with -betterC
Comment 1 Walter Bright 2023-01-08 06:31:38 UTC
Related:

https://github.com/dlang/dmd/pull/14789
Comment 2 Dlang Bot 2023-01-08 06:56:49 UTC
@WalterBright created dlang/dmd pull request #14791 "fix Issue 23606 - betterC with CTFE and gc" fixing this issue:

- fix Issue 23606 - betterC with CTFE and gc

https://github.com/dlang/dmd/pull/14791
Comment 3 Dlang Bot 2023-01-10 03:55:57 UTC
dlang/dmd pull request #14791 "fix Issue 23606 - betterC with CTFE and gc" was merged into master:

- 96817ff671fe1f6e0bd9be05fed1433bba9e5179 by Walter Bright:
  fix Issue 23606 - betterC with CTFE and gc

https://github.com/dlang/dmd/pull/14791
Comment 4 Jack Stouffer 2023-01-16 21:04:19 UTC
I found another example of the same issue https://issues.dlang.org/show_bug.cgi?id=23637