🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: another 2.2.2 bug

#962
From: Mike Stump
Date: Tue, 15 Sep 1992 07:03
27 lines
1159 bytes
This problem should not exist in the next release of gcc.

> Date: Wed, 1 Jul 92 14:08:11 MST
> From: muts@fss.fokker.nl (Peter Mutsaers)
> Message-Id: <9207011208.AA08674@fss.fokker.nl>
> To: bug-g++@prep.ai.mit.edu

> continuing my compilation I hit another g++ bug. A simplified example
> of it is:

> main(int argc, char **argv)
> {
>   const char *ha="ha";

>   ha = (argv[1] == 0) ? "ha" : ha;
>   puts(ha);
> }

> will give the error
> tst.c:5: assignment between incompatible pointer types

> while gcc won't. note that changing line 5 into
>   ha = (argv[1] == 0) ? ha : "ha";

> removed the complaint! Quite strange isn't it?
> Again I cannot provide a fix because of lack of knowledge of the
> internals of g++.
Technical Details
Message-ID: <9209150703.AA24145@cygnus.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!pacific.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!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!mrs
From: mrs@cygnus.com (Mike Stump)
Subject: Re:  another 2.2.2 bug
Message-ID: <9209150703.AA24145@cygnus.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 15 Sep 1992 07:03:33 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 28