[Top][All Lists]

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

Re: Subtle error defining VALMASK?

From: Dmitry Antipov
Subject: Re: Subtle error defining VALMASK?
Date: Wed, 10 Sep 2014 19:30:44 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0

On 09/10/2014 06:58 PM, Paul Eggert wrote:

There's no error here.  All three definitions are equivalent because - (1 << 
GCTYPEBITS) equals -8,
which sign-extends to the width of VAL_MAX.

fprintf (stderr, "0x%lx 0x%lx\n", VALMASK, VAL_MAX);


../../trunk/src/alloc.c: In function ‘init_alloc’:
../../trunk/src/alloc.c:7240:3: error: format ‘%lx’ expects argument of type 
‘long unsigned int’, but argument 3 has type ‘int’ [-Werror=format=]
   fprintf (stderr, "0x%lx 0x%lx\n", VALMASK, VAL_MAX);
cc1: all warnings being treated as errors



reply via email to

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