X-ROUTED: Mon, 1 Mar 1999 14:42:42 -0500 X-TCP-IDENTITY: Ultima Message-ID: <36DAED2D.4BADDA58@game-master.com> Date: Mon, 01 Mar 1999 14:40:31 -0500 From: Kevin Lang/Ultima Organization: StormTech SoftWare X-Mailer: Mozilla 4.05 [en] (Win95; I) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: BUG References: <4531617AFB AT pcc DOT tgm DOT ac DOT at> Content-Type: multipart/mixed; boundary="------------713A474FD12A94AC11F8104C" Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. --------------713A474FD12A94AC11F8104C Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit It says 2 for me Carlos Giani_AEN2003 (M2003) wrote: > > Date sent: Mon, 1 Mar 1999 11:47:19 +0200 (IST) > > From: Eli Zaretskii > > To: "Carlos Giani_AEN2003 (M2003)" > > Copies to: djgpp AT delorie DOT com > > Subject: Re: BUG > > > > > On Mon, 1 Mar 1999, Carlos Giani_AEN2003 (M2003) wrote: > > > > > Well, if you rewrite the above: > > > y= (x) ? 1 : 2 > > > > > > y will ALWAYS be 1, and NEVER 2. You have to correct it to: > > > > > > y= (x!=0) ? 1 : 2 > > > > I cannot reproduce this bug. Could you please post a *complete* program > > that can be compiled and which exhibits this problem? Also, please tell > > what version of the compiler are you using ("gcc --version" will print > > it), and what command line you used to compile the program. > > > > Here's an example program: > > #include > #include > > int main(void) > { > int x; > int y; > > x = 0; > > y = (x) ? 1 : 2; /* y will ALWAYS be 1 (this is the BUG!) */ > > printf("%i\n",y); > > getch(); > } > > I use RHIDE and GCC 2.8.1 > > +-----------------------------------------------------+ > | Carlos Giani_AEN2003, PC-Club (M2003) | > | TGM - Schule der Technik, Abteilung Elektronik | > | | > | During holidays or weekends use this email-address: | > | darkvale AT fcmail DOT com | > +-----------------------------------------------------+ -- -=šUltimaš=- WWW: http://www.game-master.com/ultima/ EMAIL: mailto:ultimaATgame-masterDOTcom (anti-spam) ICQ: 12919201 Member and founder of StormTech SoftWare, visit our page today! --------------713A474FD12A94AC11F8104C Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Kevin Lang Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Kevin Lang n: Lang;Kevin org: StormTech SoftWare adr: ;;;;Quebec;;Canada email;internet: ultima AT game-master DOT com x-mozilla-cpt: ;0 x-mozilla-html: TRUE version: 2.1 end: vcard --------------713A474FD12A94AC11F8104C--