Message-ID: <3B748D9A.5030708@operamail.com> From: Sahab Yazdani Organization: PheonixSoft Interactive User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.3+) Gecko/20010809 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: if(a==0xff) warning References: <9l1dan$nq3$01$1 AT news DOT t-online DOT com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cache-Post-Path: www.vif.com!unknown AT ip216-239-69-108 DOT vif DOT net X-Cache: nntpcache 2.4.0b4 (see http://www.nntpcache.org/) Lines: 26 NNTP-Posting-Date: Fri, 10 Aug 2001 20:42:53 CDT X-Trace: sv3-lM7QsTiJulv8Q3PprsEF1oXJMWrdGLmNt3zMZB75P9VC7/IPO6DAdt/mzjoP2aGT2KKtKaC7FvewyVH!rIhScZyn26LrN6nxOFrSSPojrMD68jsUiqRoJDrcRqZd6gQL/XAZ5i9D/+lqtBk= X-Complaints-To: abuse AT GigaNews DOT Com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly Date: Sat, 11 Aug 2001 01:42:53 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > > char a; > > a=0xff; > > if(a==0xff)foo(); > > > C:\>gcc foo.cpp -o foo.exe > foo.cpp: In function `void main()': > foo.cpp:598: warning: comparison is always false due to limited range of > data > type > 0xff=255, the limits of the char type is -127 - 127 so you can see how the "comparison is always false". -- ********************************************************* * Sahab Yazdani * "Reality is irrelevent, perception is * * Thornhill S.S * everything." - Zeddicus Zu'l Zorander * ********************************************************* * http://pheonixsoft.virtualave.net/ * *********************************************************