[LCP]Porting code from K&R -> ANSI

Robert Elsner roberte at matchmaker.com
Tue Aug 14 03:44:04 UTC 2001


Just a quick question. I'm working with some legacy code that when
ported to Linux from other Unixes, we ran into problems with our
writable strings.

K&R, strings were not constant, and ANSI, they are. So the code has been
"optimized" due to this fact, now in order for our code to work, we use
the GCC compiler flag -fwritable-strings.

I would really like to go and clear up these references, would using the
-Wwrite-strings flag be the best place to start?

Is there any easy way to approach this? Rather then compile, run and fix
where it segfaults?

Thanks in advance,
Robert




More information about the linuxCprogramming mailing list