https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50645
Eric Gallager changed:
What|Removed |Added
Status|WAITING |RESOLVED
CC|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50645
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |WAITING
Last reconfirmed|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50645
--- Comment #4 from Jonathan Wakely 2011-10-07
00:44:12 UTC ---
(In reply to comment #1)
> but LOGICALLY you don't want I warning when passing a string literal to a
> char*
> parameter in a function.
Yes you do. A string literal is immutable. A
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50645
--- Comment #3 from Jonathan Wakely 2011-10-07
00:41:25 UTC ---
(In reply to comment #0)
>
> If I declare:
>
> const char*DowNames[] = {
> "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun",
> NULL
> };
>
> as just
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50645
--- Comment #2 from Andrew Pinski 2011-10-07
00:37:40 UTC ---
IIRC it was the C standard which declared it as deprecated.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50645
--- Comment #1 from mike.c at rocketime dot com 2011-10-07 00:35:20 UTC ---
The quick fix:
#pragma GCC diagnostic ignored "-Wwrite-strings"
... of course eliminates the warnings -- but logically, you DO WANT A WARNING
when you should be declaring