unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 42305@debbugs.gnu.org
Subject: bug#42305: 28.0.50; Compilation warnings with mini-gmp
Date: Sat, 17 Oct 2020 14:15:23 +0300	[thread overview]
Message-ID: <83eelxt86s.fsf@gnu.org> (raw)
In-Reply-To: <87pn5htbhm.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat,  17 Oct 2020 12:04:05 +0200)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: 42305@debbugs.gnu.org
> Date: Sat, 17 Oct 2020 12:04:05 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > The configuration with mini-gmp, when GMP is not installed, doesn't
> > compile cleanly.  First, compilation in lib/ emits this warning:
> >
> >     CC       mini-gmp-gnulib.o
> >   mini-gmp-gnulib.c:28:10: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
> >   # pragma GCC diagnostic ignored "-Wsuggest-attribute=malloc"
> 
> Is this with
> 
> ./configure --without-libgmp

No, this is on a system without GMP.  config.log says:

  configure:18948: checking gmp.h usability
  configure:18948: gcc -std=gnu11 -c  -O0 -g3     conftest.c >&5
  configure:18948: $? = 0
  configure:18948: result: yes
  configure:18948: checking gmp.h presence
  configure:18948: gcc -std=gnu11 -E     conftest.c
  configure:18948: $? = 0
  configure:18948: result: yes
  configure:18948: checking for gmp.h
  configure:18948: result: yes
  configure:18954: checking for library containing __gmpz_roinit_n
  configure:18985: gcc -std=gnu11 -o conftest  -O0 -g3       conftest.c -lX11   >&5
  /tmp/cchXnJLF.o: In function `main':
  /home/e/eliz/git/emacs/branch/conftest.c:221: undefined reference to `__gmpz_roinit_n'
  collect2: error: ld returned 1 exit status
  configure:18985: $? = 1
  ...
  configure:19002: result: no

The results should be identical, though, AFAIU.

> If so, I'm not able to reproduce the bug on Debian bullseye.

With what version of GCC?  This could be dependent on the compiler
version; mine in that case is

  gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4

as was reported originally.  (This is on fencepost.gnu.org, btw.)

> But I see that mini-gmp-gnulib.c was updated a couple of weeks after
> you reported this.  Are you still seeing these warnings on your
> system?

The warning in mini-gmp-gnulib.c is indeed gone, but GMP-related
warnings in our own sources still remain.  Examples:

  floatfns.c: In function ‘rescale_for_division’:
  floatfns.c:374:10: warning: assignment from incompatible pointer type [enabled by default]
	 pn = t;
	    ^
  floatfns.c:382:10: warning: assignment from incompatible pointer type [enabled by default]
	 pn = t;
	    ^
    CC       fns.o
  data.c: In function ‘bignum_arith_driver’:
  data.c:2821:9: warning: assignment from incompatible pointer type [enabled by default]
     accum = &mpz[0];
	   ^
  data.c:2843:13: warning: assignment from incompatible pointer type [enabled by default]
	 accum = &mpz[0];
	       ^
  data.c: In function ‘Flogcount’:
  data.c:3157:11: warning: assignment from incompatible pointer type [enabled by default]
      nonneg = &mpz[0];
	     ^
    CC       emacs-module.o
    CC       timefns.o
  timefns.c: In function ‘frac_to_double’:
  timefns.c:622:9: warning: assignment from incompatible pointer type [enabled by default]
	 d = &mpz[1];
	   ^
  timefns.c:630:9: warning: assignment from incompatible pointer type [enabled by default]
	 n = &mpz[0];
	   ^
  timefns.c: In function ‘lisp_to_timespec’:
  timefns.c:923:21: warning: initialization from incompatible pointer type [enabled by default]
     mpz_t const *qt = q;
		       ^
  timefns.c: In function ‘time_arith’:
  timefns.c:1151:10: warning: assignment from incompatible pointer type [enabled by default]
      hzmin = hzmin1;
	    ^
  timefns.c: In function ‘time_cmp’:
  timefns.c:1265:10: warning: assignment from incompatible pointer type [enabled by default]
	 za = &mpz[0];
	    ^
  timefns.c:1266:10: warning: assignment from incompatible pointer type [enabled by default]
	 zb = &mpz[1];
	    ^





  reply	other threads:[~2020-10-17 11:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10  7:20 bug#42305: 28.0.50; Compilation warnings with mini-gmp Eli Zaretskii
2020-10-17 10:04 ` Lars Ingebrigtsen
2020-10-17 11:15   ` Eli Zaretskii [this message]
2020-10-18  8:14     ` Lars Ingebrigtsen
2020-10-21 18:04       ` Andy Moreton
2020-10-22 11:48         ` Lars Ingebrigtsen
2020-10-22 13:23           ` Eli Zaretskii
2020-10-22 13:24             ` Lars Ingebrigtsen
2020-10-22 13:37               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83eelxt86s.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=42305@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).