[Top][All Lists]

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

Re: intprops and warnings

From: Pádraig Brady
Subject: Re: intprops and warnings
Date: Wed, 06 Feb 2013 16:12:55 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 02/06/2013 03:31 PM, Eric Blake wrote:
On 02/06/2013 08:22 AM, Simon Josefsson wrote:
Libtasn1 recently started to use the intprops module, however it
generates warnings:

make[3]: Entering directory `/home/jas/src/libtasn1/lib'
   CC     decoding.lo
decoding.c: In function 'asn1_get_length_der':
decoding.c:88:15: error: comparison of unsigned expression < 0 is always false 

Similar issue to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43772

Yes, we've known about the problem in the past:

but I was unable to solve it at the time.

Since then, we have started using gcc pragmas to push and pop warnings,
maybe we could exploit that to at least allow you to still use the
warning category elsewhere, when using modern gcc (with older gcc, you'd
still have to avoid the warning entirely).

Is this an unavoidable consequences of using the intprops module?  Then
I'll just add -Wno-error=type-limits, although that seems unfortunate to
need that since we didn't before.

Unfortunately, without patches to intprops, -Wtype-limits and intprops
do not play nicely.

+1 to using gcc pragmas to disable the warning for just that module.
Note that's only supported in gcc >= 4.6 and thus coreutils for example
only auto enabled gcc warnings on newer gccs.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]