🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #967

Re: gcc 2.2.1 mishandles types in C++ conditionals

#967
From: Mike Stump
Date: Tue, 15 Sep 1992 07:40
20 lines
1015 bytes
This problem should not exist in the next release of gcc.

> Date: Wed, 10 Jun 92 21:26:30 PDT
> From: eggert@twinsun.com (Paul Eggert)
> Message-Id: <9206110426.AA07003@farside.twinsun.com>
> To: bug-g++@prep.ai.mit.edu

> gcc 2.2.1 wrongly complains about the following program:

> 	char *d;
> 	main() { d = d ? "" : d; }

> Here's a transcript that illustrates the problem.

> 	$ gcc t.cc
> 	t.cc: In function `int  main ()':
> 	t.cc:2: assignment between incompatible pointer types

> Replacing `d ? "" : d' with the logically equivalent `!d ? d : ""'
> makes the bug vanish!
Technical Details
Message-ID: <9209150740.AA28427@cygnus.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!mrs

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!mrs
From: mrs@cygnus.com (Mike Stump)
Subject: Re:  gcc 2.2.1 mishandles types in C++ conditionals
Message-ID: <9209150740.AA28427@cygnus.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 15 Sep 1992 07:40:06 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 21