This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13868] Conditional expression operator and implicit char array conversion
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jan 2004 17:59:18 -0000
- Subject: [Bug c++/13868] Conditional expression operator and implicit char array conversion
- References: <20040126172022.13868.joerg.richter@pdv-fs.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-01-26 17:59 -------
I'm not sure if 5.16/3 applies. The second argument to the ?: operator
has type "const char[3]", and the third one can be converted to
"char[4]". When I change this, then gcc accepts the code.
On the other hand, 5.16/6 talks about array to pointer conversions.
FWIW, icc accepts the code.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13868