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: Removing -frwitable-strings


On Thu, Dec 18, 2003 at 11:02:06AM -0800, Mark Mitchell wrote:
> On Thu, 2003-12-18 at 10:57, Jamie Lokier wrote:
> > Someone said that -fwritable-strings could be implemented in the front
> > end, but currently it isn't and that adds unwanted code to
> > the back end.
> > 
> > Perhaps it's quite a simple change to make string constants have type
> > "char[]" in the C and C++ front ends instead of "const char[]"?  (No,
> > I'm not volunteering).
> 
> It ain't that easy, sadly.

It would seem that the front end would need to generate a static
char[] array for each literal string, and use its address as the value
of the literal string expression.  If that were done, the back end could
eliminate its support for -fwritable-strings.


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