This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c/7527: gcc 2.95.3 and gcc 3.0.4 generate incorrect code


The following reply was made to PR c/7527; it has been noted by GNATS.

From: Stian <stian@knowledge-network.no>
To: gcc-gnats@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, 
	tomdean@asus.tddhome
Subject: Re: c/7527: gcc 2.95.3 and gcc 3.0.4 generate incorrect code
Date: 08 Aug 2002 12:08:55 +0200

 The second conditional makes more sense if you use () at the right places
 
 if(!(_io_ports[0x39]&0x80))
 
 
 If you don't add them, your statement is the same as
 
 if((!_io_ports[0x39])&0x80)
 
 That always come out false, then ! makes the result of the io-read either 0 or 1.
 
 
 
 Stian
 
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]