This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bugreport: implicitly converting (const char*) to (char*)


Dear working group,

  Although it looks quite simple, I found the code which implicitly
converts a const char* to char*:

  char* str = "Helloworld";
  *str = 'a';

  It can be legally compiled, and certainly produces an error when
running.

  I'm not certain whether it's actually a bug or not.

  Hope to hear from you.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]