Thread overview
[Bug 236] Empty structs not copied correctly
Aug 11, 2016
Johannes Pfau
Oct 01, 2016
Johannes Pfau
Oct 01, 2016
Iain Buclaw
August 11, 2016
http://bugzilla.gdcproject.org/show_bug.cgi?id=236

--- Comment #1 from Johannes Pfau <johannespfau@gmail.com> ---
I tried adding a fake 1 ubyte field to such types, but this messes up interfacing with C/C++ ABIs for empty structs. Is there any oher way to force the backend to actually intialize/copy the data in a struct variable?

-- 
You are receiving this mail because:
You are watching all bug changes.
October 01, 2016
http://bugzilla.gdcproject.org/show_bug.cgi?id=236

Johannes Pfau <johannespfau@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Johannes Pfau <johannespfau@gmail.com> ---
The spec doesn't guarantee any consistent hashing for empty structs. Fix for the druntime test:

https://github.com/D-Programming-GDC/GDC/commit/4191dbfbc70327a69490c6da717523eb330f39d9

-- 
You are receiving this mail because:
You are watching all bug changes.
October 01, 2016
http://bugzilla.gdcproject.org/show_bug.cgi?id=236

--- Comment #3 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Strictly speaking, field-less structs aren't copied around in our codegen for GCC anyway (there's nothing to copy).  Empty variables aren't passed, a new empty constructor is generated instead.

This is what the backend expects to see also.

-- 
You are receiving this mail because:
You are watching all bug changes.