www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16439] New: Non-typesafe variadic functions can never be safe

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

          Issue ID: 16439
           Summary: Non-typesafe variadic functions can never be  safe
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

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 ...)

--
Aug 28 2016