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

          Issue ID: 22877
           Summary: importC: wrong sizeof for string literal
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

int printf(char *, ...);
int main()
{
        printf("%d\n", (int)sizeof("a"));
}

this should print 2 (length of the string plus one), but right now it prints
the size of a pointer regardless of the string length

--

Reply via email to