Re: [gnu.org #244350] i am seeing a new warning with gcc 3.3.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



you are doing something like :

if (l >= 0 )
{
   **
}

with for example

unsigned int l;

As l is always greater or equal to 0, the test is always true.

regards

Vincent Torri


On Wed, 8 Jun 2005, Tony Wieczorek via RT wrote:

> I'm sorry, but as this is only a general contact address, I cannot
> properly answer technical questions such as yours.  The best I can do is
> refer you to the GCC Manual (http://gcc.gnu.org/onlinedocs/) and
> Frequently Asked Questions (http://gcc.gnu.org/faq.html).  If neither of
> those provide an answer to your question, please contact the GCC users'
> help list; you can learn more about it at <http://gcc.gnu.org/lists.html>.
>
> I am sorry that I couldn't be of more help.
>
>> [rambabu.gajula@xxxxxxxx - Wed Jun 01 07:02:37 2005]:
>>
>> Hi,
>>
>>
>>
>> I have started using the  gcc 3.3.2 on sun solaris (OS version :  5.10),
>> I am facing new compilation warnings.
>>
>>
>>
>>
>>
>> Waring says about one logical comparision with macro.
>>
>>
>>
>> I have one macro( value is =255). I am trying to compare  with unsigned
>> integer .
>>
>>
>>
>> Warning: Comparison is always true  due to limited range.
>>
>>
>>
>> How can I suppress this warning, I am not seeing the same with old gcc.
>>
>>
>>
>> Please help me out.
>>
>>
>>
>>
>>
>> Thanks,
>>
>> Rambabu
>>
>> .
>>
>>
>>
> -- 
> Tony Wieczorek
> Program Assistant
> (617) 542-5942
>
> Free Software Foundation
> 59 Temple Place, Suite 330
> Boston, MA 02111-1307 USA
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux