Warnings about rcs_id strings: let's settle this

Fergus Henderson fjh@cs.mu.OZ.AU
Fri May 2 18:31:00 GMT 2003


On 02-May-2003, Kean Johnston <jkj@sco.com> wrote:
> the original
> construct that spawned this thread was almost always written as
> static char *sccsid = "blah";. By the way, why does THAT not emit a
> warning? You are assigning a const char * to a char *, thereby
> potentially losing the const-ness of it. I just tried with the head
> version and -Wall -Wextra -Wcast-qual didn't emit a warning.

"-Wwrite-strings" is the one you're looking for.
The manual explains why it is not in -Wall.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.



More information about the Gcc mailing list