[Bug c++/14958] incorrect compile of ?:, specifically ptr = flag? class_obj: 0;

gsmith at alumni dot uwaterloo dot ca gcc-bugzilla@gcc.gnu.org
Wed Apr 14 19:46:00 GMT 2004


------- Additional Comments From gsmith at alumni dot uwaterloo dot ca  2004-04-14 19:28 -------
Thank you! I made the constructor 'explicit' and now I get an error
on that line, which is much better. I couldn't see any way that this
could be valid *and* produce these particular results, sorry to
clutter up the buglist.
This explains why both of these work:

short * foop = flag? foo : (short *)0;
short * foop = flag? (short*)foo : 0;




-- 


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



More information about the Gcc-bugs mailing list