all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Angelo Graziosi <angelo.graziosi@alice.it>
Cc: kbrown@cornell.edu, emacs-devel@gnu.org
Subject: Re: Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64
Date: Thu, 01 Sep 2016 19:04:45 +0300	[thread overview]
Message-ID: <83a8frfvxe.fsf@gnu.org> (raw)
In-Reply-To: <ce23d1a3-d3d9-fe80-8dfe-16c2ca37500b@alice.it> (message from Angelo Graziosi on Thu, 1 Sep 2016 17:42:06 +0200)

> Cc: kbrown@cornell.edu, emacs-devel@gnu.org
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> 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



  reply	other threads:[~2016-09-01 16:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31  8:01 Too many warnings building Emacs with GCC 6 on MSYS2-MinGW64 Angelo Graziosi
2016-08-31 14:27 ` Eli Zaretskii
2016-08-31 15:01   ` Angelo Graziosi
2016-08-31 15:42     ` Eli Zaretskii
2016-08-31 17:40       ` Angelo Graziosi
2016-08-31 18:11         ` Ken Brown
2016-08-31 18:47           ` Eli Zaretskii
2016-08-31 19:56             ` Angelo Graziosi
2016-09-01  2:37               ` Eli Zaretskii
2016-09-01  7:44                 ` Angelo Graziosi
2016-09-01 14:17                   ` Eli Zaretskii
2016-09-01 15:42                     ` Angelo Graziosi
2016-09-01 16:04                       ` Eli Zaretskii [this message]
2016-09-01 16:12                         ` Eli Zaretskii
2016-09-01 16:14                         ` Angelo Graziosi
2016-09-01 16:17                         ` Davis Herring
2016-09-01 16:24                           ` Ken Brown
2016-09-01 17:43                             ` Davis Herring
2016-09-01 16:29                           ` Eli Zaretskii
2016-09-01 16:32                         ` Andreas Schwab
2016-09-01 16:49                           ` Eli Zaretskii
2016-09-01 16:25                     ` Angelo Graziosi
2016-09-01 16:30                       ` Eli Zaretskii
2016-09-01 19:44                         ` Angelo Graziosi
2016-09-01 17:19                     ` Eli Zaretskii
2016-08-31 18:18         ` Eli Zaretskii
2016-09-01 18:50           ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a8frfvxe.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=angelo.graziosi@alice.it \
    --cc=emacs-devel@gnu.org \
    --cc=kbrown@cornell.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.