Subject: Re: CVS commit: syssrc
To: Charles M. Hannum <root@ihack.net>
From: Matthew Jacob <mjacob@feral.com>
List: port-sparc64
Date: 12/30/2000 11:56:36
> 
> > Read my update. It is a bug somewher and not the code.
> >
> > char *foo = "XXX"
> >
> > is not
> >
> > const char *foo = "XXX";
> 
> That's true, but the *string literal* is a `const char *'.  It gets
> stored in the text section, and is read-only.

I do not agree. If the pointer is not a pointer to a const, a writable
dereference for the object should promote the object to non-const status.

Ergo, "XXX" in this case should not go in the read-only strings section but
should go into the initialized data section (as an unnamed object) like any
other piece of compile time initialization.


-matt