[Issue 5461] New: Invalid declaration for auto functions in .di files generated by DMD -H

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 19 12:02:50 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5461

           Summary: Invalid declaration for auto functions in .di files
                    generated by DMD -H
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dransic at free.fr


--- Comment #0 from Nicolas Sicard <dransic at free.fr> 2011-01-19 12:00:51 PST ---
When compiling "complex" non-templated auto functions, e.g.:

auto foo() {
    struct Bar {
        int a;
    }
    auto bar = Bar(42);
    return bar;
}

with -H option, the generated .di file contains:

auto foo();

which is a (rightly) invalid declaration statement. I think that either foo's
body should be included in the .di file or that a warning/error should be
thrown on compilation of such a function with the -H switch.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list