www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22322] New: ImportC: struct with floating point members gives

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

          Issue ID: 22322
           Summary: ImportC: struct with floating point members gives
                    bizarre error.
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: dave287091 gmail.com

The following C code fails to compile.

struct S {
    float f;
};

struct S2 {
    double d;
};

Error: `tupleof` is not a member of `const(S)`
Error: invalid `foreach` aggregate `_error_`
Error: `tupleof` is not a member of `const(S2)`
Error: invalid `foreach` aggregate `_error_`

Note that the error messages do not have source location either!

--
Sep 19