On Tue, Apr 19, 2005 at 11:36:48AM +0300, Amir Binyamini wrote:

> telford noted that info gcc shows that this option is deprecated.
> http://lists.slug.org.au/archives/slug/2005/04/msg00404.html
> 
> It could be that in newer versions (gcc 3.4,gcc4)  this flag is built-in,

Quite the opposite, the option is marked as deprecated because the
authors of gcc don't much like the way you write programs and want
you to modify your code so that it will not need writable strings.

Then again, they will never be able to remove the option because
they want gcc to remain compatible with other compilers so what they
are saying is, "sure we will support your program but you are a
naughty boy to write such code."

> I don't know; but in man gcc in gcc 3.3.3 they also say
> that this is a bad idea ;I must find time  to check what implications such 
> a flag have and if
> it can cause any troubles and in which scenarios.

I'm pretty sure it never actually causes trouble, it's more of a
"good programming" argument about whether strings should be regarded
as constant or not. You can spend a lot of time arguing about
what is good programming style and people do. I've been thinking
about writing a book on as much but I'm wondering if anyone would
buy it :-)

        - Tel  ( http://bespoke.homelinux.net/ )

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to