delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type; q=dns; s=default; b=DD0f | |
WidyHbru1LRThjW0qaelyYzDuA2XOjQh4LSH8zGQS4J32ovoiZKOtONHA875gdSy | |
+kr4uTyZYFgHJLgls5ZQmmWn14rSixzyXOi2aoZKu19X1RH1wswz5SzNSO8xbikg | |
bbmmK7uH9TU98Rn5xDI7/Ia4eKw9+q6xrpQ29GI= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type; s=default; bh=SitdQjNp9f | |
DW/LsAl4Nxj2EO1do=; b=vP4HzRVeyihWdp6nZDNaj7B3ntcwJ8ocR4MY03F5tS | |
GHizo5IUfjfSQM7M/MMfg3A+5jWz/IGhiNfRQuBIF/45ZGxXsVUQacjQy4R3NlDA | |
PJWNCUM81fN1cK74fYdQbHkJv0ga6EWZUFrrrHPcmY2M9pdFIbdSWm3QH0xxd/2m | |
Q= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= |
X-HELO: | mail-pf0-f169.google.com |
X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=cNVews9c+/M3HVCVVCFzYktIkodwawUewiA04tFjHGY=; b=NvRSEX/l/9JhWyYb4+LACGFmJhRKcBJH4pfmX1ccwGcPEGkuUpu4mFOzCyuNijFj7g Ut/q3ASofuCo6cw05T47Y2sDghw4p5jA77Jxb+ywpSW7F3ZK9jUIP267mncNLQiiOh8t YSgLoBWICUV3V5t/gHfBtV2+74OvlGAo89i/NnRuJAJFWLOYbAsEFobCx5KERvEwT9o/ j/DgmNapfJQTc1Wxig27n62MwGRpXREnMdzcLBC4wbgMbkmZDwrk9rusu2QkhvndtRte bP+EhR7SiuF80IK3DV8Yn337tvWjG/Wa1XMn9B2WBJR2kwBWY1+g+TRL76d/epHXzQ38 Y5jQ== |
X-Gm-Message-State: | AMCzsaUKCe+DDiG+tE3u59T4Kg8KnC/CZhKedpuGk6Iwj0HO/k9a56UR ZxAtQ/TsE+hzoDdOVQm5m3gx8A== |
X-Google-Smtp-Source: | ABhQp+SZ7m3Jdk29KzVLV8A7kA/2AHFA8AQdOsPYWuWlbG3UwgQ1/kRcn+Z+qAp2PVuO3lZEbGg7xQ== |
X-Received: | by 10.84.209.164 with SMTP id y33mr9006152plh.439.1508801200173; Mon, 23 Oct 2017 16:26:40 -0700 (PDT) |
Subject: | Re: cygwin x86_64: mingw64-g++ 6.4.0 (both i686 and x86_64) issue (bug?) with reinterpret_cast |
To: | cygwin AT cygwin DOT com |
References: | <e53af017e2d84c40bb763073b4d3fd00 AT SFHDAG5NODE3 DOT st DOT com> |
From: | JonY <10walls AT gmail DOT com> |
Message-ID: | <b5eb7686-58b7-6501-b7a5-d8cb255d3921@gmail.com> |
Date: | Mon, 23 Oct 2017 23:25:04 +0000 |
User-Agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
MIME-Version: | 1.0 |
In-Reply-To: | <e53af017e2d84c40bb763073b4d3fd00@SFHDAG5NODE3.st.com> |
X-IsSubscribed: | yes |
--k18dNCcvlPHOvNwgGE6HgkXjtOEESAu8P Content-Type: multipart/mixed; boundary="mNFn1frOkiRNx1JWQVBU54SK22U58V6Bm"; protected-headers="v1" From: JonY <10walls AT gmail DOT com> To: cygwin AT cygwin DOT com Message-ID: <b5eb7686-58b7-6501-b7a5-d8cb255d3921 AT gmail DOT com> Subject: Re: cygwin x86_64: mingw64-g++ 6.4.0 (both i686 and x86_64) issue (bug?) with reinterpret_cast References: <e53af017e2d84c40bb763073b4d3fd00 AT SFHDAG5NODE3 DOT st DOT com> In-Reply-To: <e53af017e2d84c40bb763073b4d3fd00 AT SFHDAG5NODE3 DOT st DOT com> --mNFn1frOkiRNx1JWQVBU54SK22U58V6Bm Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 10/23/2017 02:47 PM, Paolo ZAMBOTTI wrote: > Hello, >=20 > I'm having some issues while compiling C++ code with mingw64 c++ compiler= (6.4.0) distributed within Cygwin packages. > I can guess the issue I'm going to report is not strictly related to Cygw= in distribution but I cannot test other mingw64 distributions so let me sta= rt reporting the issue here... > Once said that, I'm open to any suggestions for better reporting place... >=20 > I'm not an expert in C and even less in C++ so I hope to not generate stu= pid noise... but the same code was compiling fine with previous version (5.= 4) ... >=20 Neither am I. > The attached file is the simplest example that triggers the issue. >=20 > If I try to compile with "x86_64-w64-mingw32-gcc -o test.exe test.cpp" th= e output is the following >=20 > test.cpp: In function 'int main(int, char**)': > test.cpp:7:34: error: reinterpret_cast from integer to pointer > static constexpr void* test2 =3D (void*)(-1LL); > ^~~~~~~~~~~~~ >=20 > While, if I try to compile with "i686-w64-mingw32-gcc -o test.exe test.cp= p" the output is the following >=20 > test.cpp: In function 'int main(int, char**)': > test.cpp:12:34: error: reinterpret_cast from integer to pointer > static constexpr void* test2 =3D (void*)(-1L); > ^~~~~~~~~~~~ >=20 As a comparison, both -1L and -1LL fails for me on 64bit Linux with gcc-6.4.0. > The test is effectively build to always fail but the current behavior is = exactly the opposite of what I was expecting: > x86_64 complains with (-1LL) cast while I was expecting it to fail on (-1= L) > i686 complains with (-1L) cast while I was expecting it to fail on (-1LL) >=20 I think it is best to check with gcc-help what the correct behavior is. --mNFn1frOkiRNx1JWQVBU54SK22U58V6Bm-- --k18dNCcvlPHOvNwgGE6HgkXjtOEESAu8P Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQJGBAEBCAAwFiEE5QrdnbBX9Ppk4bbPcTtf4pwUXUUFAlnuelESHDEwd2FsbHNA Z21haWwuY29tAAoJEHE7X+KcFF1FIzAP/iTHawOMcDcKQjprKKR+SoGc/BjGAg3B LBjbehoonA8XzvcTQXgKsGQ4UV7R7flk/4Tuf9XEjp7hsOx8qLiyFRXyZy369uAw fD1WTWKW5RjmkOc+cKv5PurKCCp3XXRU1oIzSK72Ay2D7ev4bs9UYInCsB2xHHac z4tbqoBOYluDpKb2UCUMJqY80aY/L5OIpK2HEHjjEYxPoh5r8R2fcEB4vZY18iTH od1yWZPxOVNWKnefzCWxDql55LVfhqOIPiYNHjfB2dqHaGNIvPl7sw6GCD1z6QC5 cge6XrNQtwBI558DB8D8JB6XhoG4VQRtH5Liv/ZPd299xXS010yeyBrYBDNyqEFs YG8D33POiYojDSO/yvaZEFKvu30GeiXZd9kLv4oYXnLrF8tALTk1+bZE6NzDPO7T xxq7hV15KzfqF95jSVex+IuN3J/Owt4F7H7rQf82KazgNz8s2A5ghPOOqWqXGPvc h6mXtl1PHdt63aWEW9cmqTMHgsjrqJH9MgF26Yb7+4cPt/+JaqSZ+joykTaAH2Bm LlKTb+kBr2ZKPE5LysKzOpFCUg68A3qgX0FAjiU3bDB17o9+1S72mZ441wYC9ZFk cywfrzL+vOm42BGwOX6QtduwjU3RqyZQqdw/pQev/OeKPn+IZH0rajHmY6lzn5bL pZuQcXqw7N2o =iApT -----END PGP SIGNATURE----- --k18dNCcvlPHOvNwgGE6HgkXjtOEESAu8P--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |