This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/50645] old issue - deprecated conversion from string to char*
- From: "mike.c at rocketime dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 07 Oct 2011 00:35:20 +0000
- Subject: [Bug c/50645] old issue - deprecated conversion from string to char*
- Auto-submitted: auto-generated
- References: <bug-50645-4@http.gcc.gnu.org/bugzilla/>
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
const char* (and you forget const)
but LOGICALLY you don't want I warning when passing a string literal to a char*
parameter in a function.