This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Q: C++ FE emitting assignments to global read-only symbols?


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
mark@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]