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 #67 received at 36597-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: larsi <at> gnus.org, 36597-done <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 17:52:44 +0300
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 36597-done <at> debbugs.gnu.org
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Tue, 11 Aug 2020 02:33:34 -0700
> 
> It also simplifies the code a bit, so I took the liberty of installing it

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"
	|                 ^
  pdumper.c:1012:19: warning: format '%d' expects argument of type 'int', but argument 3 has type 'EMACS_UINT' {aka 'long long unsigned int'} [-Wformat=]
   1012 |       dump_trace ("new object %0*"pI"x weight=%d\n", EMACS_INT_XDIGITS, uobj,
	|                   ^~~~~~~~~~~~~~~~                                      ~~~~
	|                                                                         |
	|
  EMACS_UINT {aka long long unsigned int}
  pdumper.c:1012:48: note: format string is defined here
   1012 |       dump_trace ("new object %0*"pI"x weight=%d\n", EMACS_INT_XDIGITS, uobj,
	|                                               ~^
	|                                                |
	|                                                int
	|                                               %I64d
  pdumper.c:1012:19: warning: too many arguments for format [-Wformat-extra-args]
   1012 |       dump_trace ("new object %0*"pI"x weight=%d\n", EMACS_INT_XDIGITS, uobj,
	|                   ^~~~~~~~~~~~~~~~
  pdumper.c: In function 'dump_queue_dequeue':
  pdumper.c:1229:6: warning: format '%d' expects argument of type 'int', but argument 3 has type 'gl_intptr_t' {aka 'long int'} [-Wformat=]
   1229 |     (("dump_queue_dequeue basis=%"PRIdDUMP_OFF" fancy=%"PRIdPTR
	|      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1230 |       " zero=%"PRIdPTR" normal=%"PRIdPTR" strong=%"PRIdPTR" hash=%td\n"),
	|       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   1231 |      basis,
   1232 |      dump_tailq_length (&dump_queue->fancy_weight_objects),
	|      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	|      |
	|      gl_intptr_t {aka long int}
  pdumper.c:1229:6: warning: format '%d' expects argument of type 'int', but argument 4 has type 'gl_intptr_t' {aka 'long int'} [-Wformat=]
  pdumper.c:1229:6: warning: format '%d' expects argument of type 'int', but argument 5 has type 'gl_intptr_t' {aka 'long int'} [-Wformat=]
  pdumper.c:1229:6: warning: format '%d' expects argument of type 'int', but argument 6 has type 'gl_intptr_t' {aka 'long int'} [-Wformat=]
  pdumper.c:1229:6: warning: unknown conversion type character 't' in format [-Wformat=]
  pdumper.c:1229:6: warning: too many arguments for format [-Wformat-extra-args]
  pdumper.c:1310:15: warning: unknown conversion type character 'l' in format [-Wformat=]
   1310 |   dump_trace ("  result score=%f src=%s object=%0*"pI"x\n",
	|               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  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"
	|                 ^
  pdumper.c:1310:15: warning: too many arguments for format [-Wformat-extra-args]
   1310 |   dump_trace ("  result score=%f src=%s object=%0*"pI"x\n",
	|               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  pdumper.c: In function 'hash_table_thaw':
  pdumper.c:2667:30: error: conversion from 'EMACS_INT' {aka 'long long int'} to 'ptrdiff_t' {aka 'int'} may change value [-Werror=conversion]
   2667 |   h->hash = make_nil_vector (XFIXNUM (h->hash));
	|                              ^~~~~~~~~~~~~~~~~
  cc1.exe: some warnings being treated as errors
  Makefile:401: recipe for target `pdumper.o' failed
  make[1]: *** [pdumper.o] Error 1




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.