From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#42305: 28.0.50; Compilation warnings with mini-gmp Date: Sat, 17 Oct 2020 14:15:23 +0300 Message-ID: <83eelxt86s.fsf@gnu.org> References: <87pn5htbhm.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19390"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42305@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 17 13:16:21 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kTkCD-0004uU-8h for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Oct 2020 13:16:21 +0200 Original-Received: from localhost ([::1]:50172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTkC9-0005Po-1q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Oct 2020 07:16:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTkBu-0005PN-O9 for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2020 07:16:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kTkBu-00021G-Eq for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2020 07:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kTkBu-0002gO-8T for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2020 07:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Oct 2020 11:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42305 X-GNU-PR-Package: emacs Original-Received: via spool by 42305-submit@debbugs.gnu.org id=B42305.160293333010269 (code B ref 42305); Sat, 17 Oct 2020 11:16:02 +0000 Original-Received: (at 42305) by debbugs.gnu.org; 17 Oct 2020 11:15:30 +0000 Original-Received: from localhost ([127.0.0.1]:33579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTkBO-0002fY-48 for submit@debbugs.gnu.org; Sat, 17 Oct 2020 07:15:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTkBM-0002fL-II for 42305@debbugs.gnu.org; Sat, 17 Oct 2020 07:15:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53892) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTkBH-0001tk-7H; Sat, 17 Oct 2020 07:15:23 -0400 Original-Received: from [176.228.60.248] (port=2413 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kTkBG-0000wo-Kn; Sat, 17 Oct 2020 07:15:23 -0400 In-Reply-To: <87pn5htbhm.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat, 17 Oct 2020 12:04:05 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:190801 Archived-At: > From: Lars Ingebrigtsen > Cc: 42305@debbugs.gnu.org > Date: Sat, 17 Oct 2020 12:04:05 +0200 > > Eli Zaretskii 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]; ^