From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Angelo Graziosi Newsgroups: gmane.emacs.devel Subject: Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64 Date: Wed, 31 Aug 2016 21:56:45 +0200 Message-ID: <11ac6b41-3a59-ec19-c414-151c08a91ba3@alice.it> References: <50083875-fbf6-d6b2-ffac-08c17c2bc696@alice.it> <83r395ko7o.fsf@gnu.org> <83h9a1kks6.fsf@gnu.org> <8337lklqrl.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1472673532 2239 195.159.176.226 (31 Aug 2016 19:58:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 31 Aug 2016 19:58:52 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 Cc: emacs-devel@gnu.org To: Eli Zaretskii , Ken Brown Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 31 21:58:48 2016 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 1bfBen-0008K1-Lp for ged-emacs-devel@m.gmane.org; Wed, 31 Aug 2016 21:58:45 +0200 Original-Received: from localhost ([::1]:55773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfBel-00036N-Dl for ged-emacs-devel@m.gmane.org; Wed, 31 Aug 2016 15:58:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfBd9-0001e2-2k for emacs-devel@gnu.org; Wed, 31 Aug 2016 15:57:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfBd4-0000QW-3m for emacs-devel@gnu.org; Wed, 31 Aug 2016 15:57:02 -0400 Original-Received: from smtp202.alice.it ([82.57.200.98]:55164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfBd3-0000QI-Ne; Wed, 31 Aug 2016 15:56:58 -0400 Original-Received: from [192.168.1.100] (79.45.0.244) by smtp202.alice.it (8.6.060.43) (authenticated as angelo.graziosi@alice.it) id 57C4077A00612B0D; Wed, 31 Aug 2016 21:56:55 +0200 In-Reply-To: <8337lklqrl.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.98 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:207037 Archived-At: Il 31/08/2016 20:47, Eli Zaretskii ha scritto: >> Cc: emacs-devel@gnu.org >> From: Ken Brown >> Date: Wed, 31 Aug 2016 14:11:41 -0400 >> >> According to >> >> http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html >> http://man7.org/linux/man-pages/man2/execve.2.html >> >> you should include , and the return type should be int. > > Thanks. On MS-Windows, execve is not declared in unistd.h, it's > declared in process.h (which we cannot include, because it conflicts > with our own process.h). Nevertheless, doing what you suggest is > worth a try, since there are no other ideas. > As always, Ken's suggestions are right! Now this test case, $ cat test.c /*#include */ #include /*extern intptr_t execve (const char *, char * const *, char * const *);*/ /*extern intptr_t execve (const char *, char * const [], char * const []);*/ extern int execve (const char *, char * const *, char * const *); int main() { return 0; } builds without warnings with $ gcc -Wall test.c BTW, I tried my first test case (that with the Emacs definition of 'execve') with the other compilers in MSYS2/MinGW-64/32, and both MSYS2 gcc 5.3 and MinGW64 gcc-6.1 give the warning, instead MinGW32 gcc-6.1 does not print warnings. Ciao, Angelo.