Re: [Synfig-devl] c++11 : lvalue required as unary '&' operand << stack allocation ?
> From: Ivan Mahonin- 2016-01-20 21:27:29 > > Hello! > > I think following code will save us: > > - Array arr_surface(().real()); > + Array arr_surface((Real*)()); Now i can do a full c++11 synfig-core build ! Thank's Ivan... let's do it again ... https://www.youtube.com/watch?v=3SazTdJxwLI > > In previous implementation of GCC real() returns reference instead of value. > But anyway old and new standards says what real() should returns value > (not reference). So it's my bug. About memory corruption, oups no way... : all variables are from the same scope. -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140 ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
Re: [Synfig-devl] c++11 : lvalue required as unary '&' operand << stack allocation ?
Hello! I think following code will save us: - Arrayarr_surface(().real()); + Array arr_surface((Real*)()); In previous implementation of GCC real() returns reference instead of value. But anyway old and new standards says what real() should returns value (not reference). So it's my bug. > Hello here... > > I'm taking care of the "#904 - C++11 and libsigc++ 2.6.0 support"[1] and > i'm front a problem i need help to solve. > > Firstly in this branch, i have enable c++11 support by adding some M4 and > converting isnan & isinf to std::' [2] > > Now i'm front face of "lvalue required as unary '&' operand" errors. > I take look here and there, try different things, and finally, found a way > to solve it [3] ... at least it build . > > - Array arr_surface(().real()); > + Real surfacereal(surface.front().real()); > + Array arr_surface(& surfacereal); > > > WHATSTHEPROBBRO? > Memory ! > Not leak... but i think that could create memory corruption. > The surfacereal variable is allocated into the stack and passed by > references the arr_surface. > > What do you think ? > Does that solution create a potential corruption? > Do you have a smarter (because i do'nt like it) solution ? > Does Chinese people also parties on gregorian calendar NY ? > > [1] http://www.synfig.org/issues/thebuggenie/synfig/issues/904 > [2] > https://github.com/d-j-a-y/synfig/commit/6a18f6a87c20889fca3958b15b7914edda24cab8 > [3] > https://github.com/d-j-a-y/synfig/commit/57e52580ac16155ea3c4dcaeace7886f9cc38c64 > [4] > https://github.com/d-j-a-y/synfig/blob/master/synfig-core/src/synfig/rendering/software/function/array.h#L160 > > Nota : if i don't say silly things, the memory corruption was already here > with previous code implementation. > > -- > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140 > ___ > Synfig-devl mailing list > Synfig-devl@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/synfig-devl > > -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140 ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl
Re: [Synfig-devl] c++11 : lvalue required as unary '&' operand << stack allocation ?
2016-01-20 14:44 GMT+06:00: > Hello here... > > I'm taking care of the "#904 - C++11 and libsigc++ 2.6.0 support"[1] and i'm > front a problem i need help to solve. > > Firstly in this branch, i have enable c++11 support by adding some M4 and > converting isnan & isinf to std::' [2] > > Now i'm front face of "lvalue required as unary '&' operand" errors. > I take look here and there, try different things, and finally, found a way to > solve it [3] ... at least it build . > > - Array arr_surface(().real()); > + Real surfacereal(surface.front().real()); > + Array arr_surface(& surfacereal); > > > WHATSTHEPROBBRO? > Memory ! > Not leak... but i think that could create memory corruption. > The surfacereal variable is allocated into the stack and passed by references > the arr_surface. > > What do you think ? > Does that solution create a potential corruption? > Do you have a smarter (because i do'nt like it) solution ? > Does Chinese people also parties on gregorian calendar NY ? > > [1] http://www.synfig.org/issues/thebuggenie/synfig/issues/904 > [2] > https://github.com/d-j-a-y/synfig/commit/6a18f6a87c20889fca3958b15b7914edda24cab8 > [3] > https://github.com/d-j-a-y/synfig/commit/57e52580ac16155ea3c4dcaeace7886f9cc38c64 > [4] > https://github.com/d-j-a-y/synfig/blob/master/synfig-core/src/synfig/rendering/software/function/array.h#L160 > > Nota : if i don't say silly things, the memory corruption was already here > with previous code implementation. What do you think, Ivan? ^__^ K. -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140 ___ Synfig-devl mailing list Synfig-devl@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/synfig-devl