www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10497] New: Opaque structs cannot be dereferenced in pointer to pointer types

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10497

           Summary: Opaque structs cannot be dereferenced in pointer to
                    pointer types
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com



11:06:51 PDT ---
-----
module test;

// opaque type
struct S;

void main()
{
    S** s;
    void* ptr;
    *s = cast(S*)ptr;  // pointer assignment, not value assignment
}
-----

$ dmd test.d
 test.d(4): Error: struct test.S unknown size
 test.d(4): Error: struct test.S no size yet for forward reference
 test.d(4): Error: struct test.S unknown size
 test.d(4): Error: struct test.S no size yet for forward reference
The size of the structure does not need to be known since what is being assigned is a memory address. It is not a value assign of the struct. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 28 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10497




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/e4ba50055c42f4b0dc67369dfcffd8a1526c7821
add test cases for issues 10497 and 10793

https://github.com/D-Programming-Language/dmd/commit/7a3dd014165c3710ffc4ed9f375d962be7516152


add test cases for issues 10497 and 10793

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 17 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10497


Henning Pohl <henning still-hidden.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |henning still-hidden.de
         Resolution|                            |FIXED


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