On Tue, 12 Oct 2010, Ian Lance Taylor wrote:
I'm not sure what you want us to suggest. You say that the names are modifiable. String constants are not modifiable. If the strings are indeed modified, and you pass in a string constant, then your program is going to crash when the library tries to modify the strings. The gcc warning is helpfully pointing that out. This is not a gcc issue. It's a C++ language issue. If you need a modifiable string, then you must not use a string constant.
I am not sure what the OP is asking for, but note that some other compilers provide an option (-features=no%conststrings for sunCC) to handle such broken legacy code without modification.
-- Marc Glisse