[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64
From: |
Eli Zaretskii |
Subject: |
Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64 |
Date: |
Thu, 01 Sep 2016 19:04:45 +0300 |
> Cc: address@hidden, address@hidden
> From: Angelo Graziosi <address@hidden>
> Date: Thu, 1 Sep 2016 17:42:06 +0200
>
> > The prototype that fixes this, with 'int' as the return value, is
> > wrong, and is IMO a MinGW64 GCC bug which should be reported.
> > intptr_t is a 64-bit type in MinGW64, while int is still 32 bits. By
> > enforcing the wrong type, GCC contradicts MinGW64's own library
> > headers.
>
> I tested the test case (that using intptr_t) on OSX with gcc-6.1 and it
> prints the same warning only using 'int' as return type the warning goes
> away...
On Unix, execve indeed returns an int, because it's a process ID. On
Windows, the return value can be a process handle, which is a 64-bit
data type on 64-bit Windows. That is why the return value must be
intptr_t, not an int.
The bug in MinGW64 GCC is that it uses the Unix model for the builtin
execve, whereas it should have used the Windows model.
Anyway, if you don't believe me, look on MSDN:
https://msdn.microsoft.com/en-us/library/hyw61wtd.aspx
- Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64, Angelo Graziosi, 2016/09/01
- Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64, Eli Zaretskii, 2016/09/01
- Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64, Angelo Graziosi, 2016/09/01
- Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64,
Eli Zaretskii <=
- Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64, Eli Zaretskii, 2016/09/01
- Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64, Angelo Graziosi, 2016/09/01
- Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64, Davis Herring, 2016/09/01
- Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64, Ken Brown, 2016/09/01
- Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64, Davis Herring, 2016/09/01
- Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64, Eli Zaretskii, 2016/09/01
- Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64, Andreas Schwab, 2016/09/01
- Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64, Eli Zaretskii, 2016/09/01
Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64, Angelo Graziosi, 2016/09/01