Daniel Berlin wrote:

Your transform is correct.
The FE is not. The variable is not read only.
It is write once, then read-only.

Diego, your analysis is exactly correct about what is happenning.

I agree, in principle. The C++ FE should not set TREE_READONLY on variables that require dynanmic initialization. Until now, that's not been a problem, and it does result in better code. But, it's now becoming a problem, and we have others way to get good code coming down the pipe.

I do think the C++ FE needs fixing before Diego's change gets merged, though. I can make the change, but not instantly. If someone files a PR, and assigns to me, I'll get to it at some not-too-distant point.

--
Mark Mitchell
CodeSourcery, LLC
[EMAIL PROTECTED]
(916) 791-8304

Reply via email to