Bug 28

Summary: bug in "operator ?:"
Product: gcc Reporter: martin
Component: c++Assignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs, nathan
Priority: P3    
Version: 2.95.2   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description martin 2000-03-04 04:36:01 UTC
 
 Date: 27 Mar 1999 00:36:07 +0100
 Original-Message-ID: <fl1zib7riw.fsf@poivre.cmla.ens-cachan.fr>
 Lines: 22


 Consider:

 poivre% cat a.C 
 struct X {};


 int main()
 {
     double* p = (true == false ? throw X() : new double);
 }

 poivre% g++ a.C 
 a.C: In function `int main()':
 a.C:6: converting to `void' from `double *'


 This happens with egcs-2.93.12 on a solaris-2.[56] (I beleive the bug
 to be platform independent). EGCS is in error according to 5.16/2.


 -- Gaby

Release:
2.95.2
Comment 1 Nathan Sidwell 2000-03-08 03:34:44 UTC
State-Changed-From-To: open->closed
State-Changed-Why: Fixed in CVS
Comment 2 Nathan Sidwell 2000-03-08 11:34:44 UTC
From: nathan@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org, martin@loewis.home.cs.tu-berlin.de,
  nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/28
Date: 8 Mar 2000 11:34:44 -0000

 Synopsis: bug in "operator ?:"
 
 State-Changed-From-To: open->closed
 State-Changed-By: nathan
 State-Changed-When: Wed Mar  8 03:34:44 2000
 State-Changed-Why:
     Fixed in CVS
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=28&database=gcc