From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel,gmane.comp.lib.gnulib.bugs Subject: Re: New warnings on emacs-26 branch with gcc 8.2.0 Date: Sat, 18 Aug 2018 21:44:20 +0300 Message-ID: <83bm9zfraz.fsf@gnu.org> References: <86a7q0ai2z.fsf@gmail.com> <86y3d88x1u.fsf@gmail.com> <9ab72594-da61-a3f4-cac4-6e61cda67da3@cs.ucla.edu> <4195986.6xTypejAr3@omega> <0771b7a4-cc93-e23e-0de5-0069ce67a270@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1534617756 16299 195.159.176.226 (18 Aug 2018 18:42:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 18 Aug 2018 18:42:36 +0000 (UTC) Cc: bug-gnulib@gnu.org, bruno@clisp.org, andrewjmoreton@gmail.com, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 18 20:42:32 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 1fr6BA-00044e-R0 for ged-emacs-devel@m.gmane.org; Sat, 18 Aug 2018 20:42:28 +0200 Original-Received: from localhost ([::1]:40070 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fr6DH-0007Dc-C1 for ged-emacs-devel@m.gmane.org; Sat, 18 Aug 2018 14:44:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fr6D9-0007DV-0z for emacs-devel@gnu.org; Sat, 18 Aug 2018 14:44:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fr6D5-0003yY-SI for emacs-devel@gnu.org; Sat, 18 Aug 2018 14:44:30 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38375) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fr6D5-0003yS-Pd; Sat, 18 Aug 2018 14:44:27 -0400 Original-Received: from [176.228.60.248] (port=3245 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fr6D5-0001ro-DF; Sat, 18 Aug 2018 14:44:27 -0400 In-reply-to: <0771b7a4-cc93-e23e-0de5-0069ce67a270@cs.ucla.edu> (message from Paul Eggert on Sat, 18 Aug 2018 10:19:54 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:228664 gmane.comp.lib.gnulib.bugs:39212 Archived-At: > From: Paul Eggert > Date: Sat, 18 Aug 2018 10:19:54 -0700 > Cc: Andy Moreton , emacs-devel@gnu.org > > Bruno Haible wrote: > > This code uses GetProcAddress so that it can exploit > > features of newer Windows versions while at the same time still > > work on older Windows versions. > > Can this problem be addressed a bit better by using GetProcAddress only inside > #ifndef HAVE_GETSYSTEMTIMEPRECISEASFILETIME code on builds for MS-Windows 7 and > earlier, and directly using GetSystemTimePreciseAsFileTime on builds for > MS-Windows 8 and later? That should fix the warning on builds for newer > MS-Windows, which might be good enough. Why not use the same method we used in the rest of Emacs instead of jumping through all of those hoops? And your suggestion will not work, because at build time it is not known on what version of the OS will the code run. > > 3) Remove -Wcast-function-type from the compiler options. > > If we do this in Emacs builds, it should be done only for MS-Windows since the > warning is generally useful on other platforms. There's no need to disable this warning at all.