No Compilation Warning...

Manje Gowda S G sakala@linuxmail.org
Thu Jun 24 17:30:00 GMT 2004


> On Tue, Jun 15, 2004 at 05:00:49PM +0800, Manje Gowda S G wrote:
> > > gowda.cc: In function nt main()':
> > > gowda.cc:7: warning: comparison of unsigned expression >= 0 is always true
> > > 
> > > for gcc 2.95.3, 3.3.3, 3.4, and 3.5 20040606 .
> > > 
> > > Maybe the bug is unique to 3.3.2 or the redhat derivative. 
> > > 
> > 
> > Do you get the warning for "unsigned int s" declaration?
> > I feel Both the messages sounds same
> > What is bothering me is, no warning Message if it is declared as "unsigned int s" in the program???.
> > 
> > I have checked for the same with the following versions of GCC, still it is the same problem
> > 
> > 1) gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
> > 2) gcc version 2.95.3 20010125 (prerelease, propolice)
> > 3) gcc version 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
> 
> Unless you can find the problem in an official FSF release, this
> discussion is not appropriate for this list.
> 
> You can always file a bug report with Red Hat, and if the problem is
> in their current compiler you should do so.
> 
> 
Sorry to mention Red Hat versions here, 
I have downloaded official FSF release 3.3.3 and 3.4.0 versions for testing and tested, still I find the same behavior. Then I have checked with the 'cc' compiler on Solaris..., Even their the behavior is same.

So I think, 
1) There is some fundamental reason behind this, I am not aware..., any light on this is greatly appreciated.

OR

2) STILL...,

	unsigned int s;

	if (0 <= s) {....}

I believe the value of "unsigned int s" is any time zero or more, 
so the above piece of code is always true... 
But, no warning message is flashed even on optimization flag is enabled.

Thanks in Advance,

Best Regards,
-Manje Gowda

-- 
______________________________________________
Check out the latest SMS services @ http://www.linuxmail.org 
This allows you to send and receive SMS through your mailbox.


Powered by Outblaze



More information about the Gcc mailing list