This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Q: C++ FE emitting assignments to global read-only symbols?
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: dalej at apple dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 9 Apr 05 08:03:12 EDT
- Subject: Re: Q: C++ FE emitting assignments to global read-only symbols?
It would be good to have a way to mark things as "write once, then
readonly" IMO. It's very common, and you can do some of the same
optimizations on such things that you can do on true Readonly objects.
We used to do this in RTL and it caused all sorts of problems.
One is that supposed you have such a variable in a function and then
you inline the function into a loop. Now all of a sudden, it's written
more than once.