This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11332] [3.3?/3.4 regression] Spurious error with casts in ?: expression
- 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 Jun 2003 16:46:44 -0000
- Subject: [Bug c++/11332] [3.3?/3.4 regression] Spurious error with casts in ?: expression
- References: <20030626164521.11332.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11332
------- Additional Comments From bangerth at dealii dot org 2003-06-26 16:46 -------
Forget the code and the error message, of course. On shouldn't change it
in the last minute. Here's the correct code and message:
------------------------------------
struct B {};
int main () {
B a;
(1 ? static_cast<B&>(a) :
*static_cast<B*>(&a));
}
-------------------------------------
tmp/gg> ~/tmp/build-gcc/gcc-install/bin/c++ -c x.cc
x.cc: In function `int main()':
x.cc:6: error: operands to ?: have different types