From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7707 invoked by alias); 14 Apr 2004 19:28:09 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 7700 invoked by uid 48); 14 Apr 2004 19:28:08 -0000 Date: Wed, 14 Apr 2004 19:46:00 -0000 Message-ID: <20040414192808.7699.qmail@sources.redhat.com> From: "gsmith at alumni dot uwaterloo dot ca" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040414182556.14958.gsmith@alumni.uwaterloo.ca> References: <20040414182556.14958.gsmith@alumni.uwaterloo.ca> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/14958] incorrect compile of ?:, specifically ptr = flag? class_obj: 0; X-Bugzilla-Reason: CC X-SW-Source: 2004-04/txt/msg01182.txt.bz2 List-Id: ------- 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