GNU bug report logs - #36597
27.0.50; rehash hash tables eagerly in pdumper

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> gmail.com>

Date: Thu, 11 Jul 2019 14:07:02 UTC

Severity: normal

Tags: patch

Found in version 27.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #70 received at 36597 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, 36597 <at> debbugs.gnu.org, pipcet <at> gmail.com
Subject: Re: bug#36597: 27.0.50; rehash hash tables eagerly in pdumper
Date: Tue, 11 Aug 2020 08:30:23 -0700
On 8/11/20 7:52 AM, Eli Zaretskii wrote:

> It doesn't compile here:
> 
>   pdumper.c: In function 'dump_queue_enqueue':
>   pdumper.c:1012:19: warning: unknown conversion type character 'l' in format [-Wformat=]
>    1012 |       dump_trace ("new object %0*"pI"x weight=%d\n", EMACS_INT_XDIGITS, uobj,
> 	|                   ^~~~~~~~~~~~~~~~
>   In file included from character.h:27,
> 		   from buffer.h:27,
> 		   from pdumper.c:34:
>   lisp.h:108:17: note: format string is defined here
>     108 | #   define pI "ll"

<https://stackoverflow.com/questions/23718110/error-unknown-conversion-type-character-l-in-format-scanning-long-long> 
suggests that this is a problem on MinGW, but pI is supposed to be "I64" on that 
platform, not "ll".

What warnings does your compiler generate for the following?

#include <stdio.h>
int a;
long long b;
int main (void) {
  printf ("x=%0*llx\n", a, b);
  printf ("x=%0*I64x\n", a, b);
  return 0;
}

and what are __MINGW32__, __USE_MINGW_ANSI_STDIO, MINGW_W64, 
__MINGW32_MAJOR_VERSION, __GNUC__, and __GNUC_MINOR__ on your platform?

On my Fedora 31 platform, the above program causes 'gcc -Wall' to say:

t.c: In function ‘main’:
t.c:6:17: warning: unknown conversion type character ‘I’ in format [-Wformat=]
    6 |   printf ("x=%0*I64x\n", a, b);
      |                 ^
t.c:6:11: warning: too many arguments for format [-Wformat-extra-args]
    6 |   printf ("x=%0*I64x\n", a, b);
      |           ^~~~~~~~~~~~~

which is what I'd expect on Fedora.




This bug report was last modified 4 years and 284 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.