Bug 16439 – Non-typesafe variadic functions can never be @safe
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-08-28T09:51:00Z
Last change time
2016-10-01T11:45:59Z
Keywords
safe, spec
Assigned to
nobody
Creator
bugzilla
Comments
Comment #0 by bugzilla — 2016-08-28T09:51:28Z
Variadic functions:
http://dlang.org/spec/function.html#variadic
C style and D style variadic functions should never be markable as @safe:
extern (C) @safe int foo1(int i, int j, ...); // C style - Error
extern (D) @safe int foo2(int i, int j, ...); // D style - Error
Typesafe variadic functions are ok:
@safe int sum(int[] ar ...)