dmd 1.063 and 2.048 release

Jordi jordi at rovira.cat
Thu Aug 19 04:39:30 PDT 2010


On 08/17/2010 02:35 AM, Walter Bright wrote:
> Jordi wrote:
>> Found it. It took me 7 iterations of binary search across the svn
>> repositories for dmd, druntime and phobos. The commit causing the
>> issue is 505 in dmd. It is related to structs returning *this, which
>> indeed i do in my maths structs.
>>
>> Now, i don't know if the bug is in dmd or in my code, but i suspect
>> that something is being treated as a reference when it shouldn't.
>> Should i add an issue even if i am not sure?
>
> Try to reduce it to the smallest possible reproducible test case, and
> then post it to bugzilla.

Instead of "peeling off" my project, which is hundreds of files and a 
lot of code, i tried to reproduce it in a small test case emulating the 
matrix operations i was suspecting of. I didn't succeed though.

I will try again when i come back from some holidays. I don't explicitly 
use "inline" anywhere though. I guess the compiler does some inlining 
anyway. Maybe if i can disable it, i can see if anything changes.

I do "return this" however in some struct methods, for example:

	Transform opMulAssign( const Transform t )
	{
		m_origin += m_basis * t.m_origin;
		m_basis *= t.m_basis;
		m_type |= t.m_type;
		return this;
	}

and others. But even if "this" is a reference like Lars pointed out, the 
method should return a copy of the struct by value, right?

Regards,

j.


More information about the Digitalmars-d-announce mailing list