[Issue 9247] New: Compiler accepts opaque struct returned by value from function pointer declaration.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 1 02:01:51 PST 2013


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

           Summary: Compiler accepts opaque struct returned by value from
                    function pointer declaration.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: aldacron at gmail.com


--- Comment #0 from Mike Parker <aldacron at gmail.com> 2013-01-01 02:01:30 PST ---
struct foo;
foo function() bar;

Thanks to a typo, something like this has been compiling in Derelict 3, and
really shouldn't have been, on every version of DMD 2.x to date. With 2.061, it
causes an error on Linux 32 and on 64-bit when compiling with -m32. No error
with the 32-bit version on Windows (haven't tested 64) and I have no idea about
Mac.

Furthermore, the error message being put out points to the opaque struct
declaration itself and not the site of the error. That made it more difficult
to track down than it could have been, given that the declarations were in
different files.

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