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]

[Bug c++/20475] static_cast falsely allows const to be cast away


------- Additional Comments From schlie at comcast dot net  2005-05-15 22:45 -------
(In reply to comment #2)
> Yup, string literal should have type 'const char *'.

I believe 'static const char []' would seem most correct?

(where although 'static const' may be cast away, there's no guarantee
 that any attempted write will not only potentially fail, but may generate
 terminal exception if the string literal is stored in physically write protected
 memory or physically in ROM)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20475


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