From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: New warnings on emacs-26 branch with gcc 8.2.0 Date: Sun, 05 Aug 2018 17:33:56 +0100 Message-ID: <86a7q0ai2z.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1533486763 7995 195.159.176.226 (5 Aug 2018 16:32:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 5 Aug 2018 16:32:43 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 05 18:32:39 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmLxN-0001x1-7q for ged-emacs-devel@m.gmane.org; Sun, 05 Aug 2018 18:32:37 +0200 Original-Received: from localhost ([::1]:59238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmLzT-0005lZ-N7 for ged-emacs-devel@m.gmane.org; Sun, 05 Aug 2018 12:34:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmLyt-0005lG-NR for emacs-devel@gnu.org; Sun, 05 Aug 2018 12:34:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmLyo-0004W6-Px for emacs-devel@gnu.org; Sun, 05 Aug 2018 12:34:11 -0400 Original-Received: from [195.159.176.226] (port=37919 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fmLyo-0004UJ-Ht for emacs-devel@gnu.org; Sun, 05 Aug 2018 12:34:06 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fmLwf-00019p-05 for emacs-devel@gnu.org; Sun, 05 Aug 2018 18:31:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:HfVL0MfLB/R2X3Qf9BM4WAn0t1c= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:228194 Archived-At: MSYS2 has recently updated to gcc 8.2.0, and this has introduced a number of new warnings on the emacs-26 branch. 1) 138 warnings about misuse of "-Wabi": cc1.exe: warning: -Wabi won't warn about anything [-Wabi] cc1.exe: note: -Wabi warns about differences from the most up-to-date ABI, which is also used by default cc1.exe: note: use e.g. -Wabi=11 to warn about changes from GCC 7 The configury is full of a large amount of code to tune warnings, most of which seems to be turning off things that should not have been turned on or checked for in the first place. On Windows, bootstrapping takes an age due to the checking of every last possible gcc warning. Can this be simplified to be less over-zealous and less time consuming ? 2) 76 warnings from use of "-Wcast-function-type", e.g. 751:C:/emacs/git/emacs/emacs-26/lib/gettimeofday.c:48:2: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'void (*)(FILETIME *)' {aka 'void (*)(struct _FILETIME *)'} [-Wcast-function-type] Most of these seem to be from GetProcAddress calls, where the desired function pointer type does not match FARPROC. The gcc docs note: The function type void (*) (void) is special and matches everything, which can be used to suppress this warning. As a workaround, this seems worse than the original problem. Can this warning be disabled, or applied more selectively ? There is one warning that is not related to GetProcAddress: C:/emacs/git/emacs/emacs-26/src/emacs-module.c: In function 'Fmodule_load': C:/emacs/git/emacs/emacs-26/src/emacs-module.c:708:17: warning: cast between incompatible function types from 'dynlib_function_ptr' {aka 'struct dynlib_function_ptr_nonce * (*)(void)'} to 'int (*)(struct emacs_runtime *)' [-Wcast-function-type] module_init = (emacs_init_function) dynlib_func (handle, "emacs_module_init"); ^ This last one appears to be showing a real problem. AndyM