www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21974] New: importC: Error: undefined identifier


          Issue ID: 21974
           Summary: importC: Error: undefined identifier
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ibuclaw gdcproject.org

On C compilers, the library never defines the va_list type itself, the compiler
always provides the full definition.

In D, we already generate the va_list type internally (Target.tvalist), this
can be exposed to importC as a `__builtin_valist` keyword to support stdio.h
and stdarg.h, which have these definitions:
typedef __builtin_va_list va_list;
typedef __builtin_va_list __gnuc_va_list;

May 25 2021