where is the string literal allocated ? On the stack ?

Rask Ingemann Lambertsen rask@sygehus.dk
Fri Apr 20 20:00:00 GMT 2007


On Fri, Apr 20, 2007 at 10:54:14AM -0500, Matthew Woehlke wrote:
> It means you should STFW for IIRC. ;-)
> http://en.wiktionary.org/wiki/IIRC (in this case, #1 or #2, not #3)
> http://www.google.com/search?q=stfw ...the first hit will do :-)

   Schweizerische Technische Fachschule Winterthur :-)

> Right, it lives in one of the read-only segments. As noted in my other 
> message it can't live on the stack or foo() would be broken, and it 
> isn't (except for the return type missing the 'const' qualifier which is 
> VERY broken).

   GCC used to have -fwritable-strings, but this option was removed for GCC
4.0.

-- 
Rask Ingemann Lambertsen



More information about the Gcc-help mailing list