Bug 24105 – Dip1000 C variadics not marked as scope should not accept scope arguments

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-08-23T16:34:28Z
Last change time
2023-08-24T16:10:18Z
Keywords
pull, safe
Assigned to
No Owner
Creator
Walter Bright

Comments

Comment #0 by bugzilla — 2023-08-23T16:34:28Z
Compile with -preview=dip1000: @safe: extern (C) void ben(int f, scope ...); extern (C) void jer(int f, ...); void bar(scope const char* p) { ben(3, p); // works jer(3, p); // should fail }
Comment #1 by dlang-bot — 2023-08-24T03:01:32Z
@WalterBright created dlang/dmd pull request #15553 "fix Issue 24105 - Dip1000 C variadics not marked as scope should not …" fixing this issue: - fix Issue 24105 - Dip1000 C variadics not marked as scope should not accept scope arguments https://github.com/dlang/dmd/pull/15553
Comment #2 by dlang-bot — 2023-08-24T16:10:18Z
dlang/dmd pull request #15553 "fix Issue 24105 - Dip1000 C variadics not marked as scope should not …" was merged into master: - 8d6352bfaa4ad4001f7b4467d8fa8d9b4c5e2cbb by Walter Bright: fix Issue 24105 - Dip1000 C variadics not marked as scope should not accept scope arguments https://github.com/dlang/dmd/pull/15553