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++/11332] [3.3?/3.4 regression] Spurious error with casts in ?: expression


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


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