[Bug c++/12964] string literal is treated as "const char[]" in conditional expression
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Nov 8 16:40:00 GMT 2003
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-08 16:40 -------
ICC 6.0 also errors out:
pr12964.cc(5): error: a value of type "const char *" cannot be used to initialize an entity of
type "char *"
char *s = n ? "foo" : "bar";
^
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12964
More information about the Gcc-bugs
mailing list