Re: [ooc-compiler] Compiler error
Brought to you by:
mva
|
From: Frank H. <hr...@te...> - 2010-08-04 12:15:45
|
On 08/03/2010 10:29 PM, Stewart Greenhill wrote: > I'm not sure what to recommend here. Obviously care should be taken with > this version of GCC. The fact that OOC builds itself fine indicates that > the problem is probably fairly rare. For efficiency, you would normally > pass records by reference anyway. I think gcc has decided to eliminate > the call to memcpy because it thinks the result is unused. When I added > a printf statement (list[0].first) after the OOC_INITIALIZE_VPAR the > problem went away. I expect that for non-trivial code its much less > likely to occur. If you want to be perfectly safe you could run oo2c > without optimization, or see if the problem is resolved in later > versions of gcc. Wow, I didn't expect you to dive downto assembler level. My personal choice is to leave the code as it is (a little bit less efficient but clearer) and switch off optimization. The last step in program development (completion, a state which my toy programs hardly ever reach) could then be optimization. Does it make sense to inform the gcc developers about the case? (I don't care about the actual restriction, just for the sake of free software code quality). Thank you a lot for your help. -- Frank Hrebabetzky +55 / 48 / 3235 1106 Florianopolis, Brazil |