On Wed, May 2, 2012 at 3:54 PM, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote: > yourpalal2@xxxxxxxxx wrote: > [...] > > Wow, lots of stuff! :-) Haha yup, this is one of the results from my time at the UoA. I'm writing a blog post about it, should be up today. > > 6457a65: Fix bug from the removal of BALMLayoutBuilder::Snake. > > > > GCC considers the method chain one big function call, so pushes all > > parameters onto the stack before hand (something I discovered after > > quite a bit of debugging). In this case, layout->RightOf() returns NULL > > before the view is added, which caused the layout to become undefined. > > I vaguely recall having encountered a similar problem a long time ago. > Unfortunately the compiler is correct. In an expression > > a.b(c) > > the result of subexpression a and c both are arguments to function c (the > "this" pointer is a regular argument) and the evaluation order of arguments > of a function is undefined as per the standard. Particularly in the context > of the layout builders that's probably something worth mentioning in the > documentation. > Ah, when you think about it that way, it sort of makes sense! At least, I can understand why it's undefined. Considering how frustrating it was to debug this, I think documenting the behaviour is a good idea. I'll make an 'easy' ticket for now, but I might do it myself if it isn't picked up quickly. --Alex