[Issue 3789] [TDPL] Structs members that require non-bitwise comparison not correctly compared

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 24 01:56:05 PDT 2013


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



--- Comment #27 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-04-24 12:55:27 MSD ---
(In reply to comment #26)
> (In reply to comment #22)
> > Just want to note the compiler often can't optimize a comparison to be bitwise
> > because of align gaps which also should be ignored to conform `opEquals`
> > behavior.
> 
> The holes must be initialized to zero, by definition, so that a bitwise
> comparison can be done.

Nop. Holes are holes, that's all.

I'd be happy if it will be documented that padding holes must be
zero-initialized. As for now we has the situation even worse than
underdocumented (as always) C11, which partially defines it in "6.7.9
Initialization", para 10.

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