http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50645
Bug #: 50645 Summary: old issue - deprecated conversion from string to char* Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: mik...@rocketime.com While I know this is an old issue, I port a lot of code, so this keeps coming up: (I know u can change the warning level). If I declare: const char *DowNames[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", NULL }; as just char* instead of const char*, YES I WOULD LIKE TO GET A WARNING. HOWEVER, if I have a function: myfunction(char *buf) {} I'd like to be able to call it like this myfunction("hello world") ... WITH NO 'deprecated conversion from string to char*' WARNING because char* as a parameter should be able to take a string as an argument -- this makes sense. It's annoying to have to cast (char*)"hello world" every place in code, as programmers always used to use, simply "hello world". (i know an option is to change the warning level -- but that has other issues.) PLEASE UNDEPRECATE! (Keep things simple, keep backward compatibility, as the old-school way is often best, designed that way for simplicity!)