| www.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:from:to:subject:date:message-id:content-type | |
| :mime-version; q=dns; s=default; b=H46CN548t0vo2B+rWmToJkUqLKFXI | |
| j+i804fYqWbfQjVuTC3QMZx3okuHV7wZGSdjDEuTTYRYm9Yu1qz3GkVjtly73Cxi | |
| NnOMGo+kLok+WhG4OA1uZKqo+Z3ae0w2KLLTJKx8l6k7vLZYg03O63FMvyQ6Cxa0 | |
| +hukHbUkUTFBOs= | |
| 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:from:to:subject:date:message-id:content-type | |
| :mime-version; s=default; bh=bMGvuJsAyZQ5v1WI64cyp+SJq1U=; b=dH/ | |
| w26gae0elIbpgBwTrfKfYWbMWP+vHQq1Y9LonU7yg21J1rn5KGv0C/FiEaVYI9eB | |
| M/JQHD5SeHMVjKQxuRBJtf3y9Ny2wtZuhx4LQLujISxgmqLZ6a+XWQ3fjnSk3Mps | |
| Ehv+7kaodXac9E0b/fGSIYL5FzkoRB/OQG0khTB0= | |
| 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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=mingw64, Latest, Hx-ms-exchange-transport-fromentityheader:Hosted, H*c:HHH |
| X-HELO: | mx07-00178001.pphosted.com |
| From: | Paolo ZAMBOTTI <paolo DOT zambotti AT st DOT com> |
| To: | "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com> |
| Subject: | cygwin x86_64: mingw64-g++ 6.4.0 (both i686 and x86_64) issue (bug?) with reinterpret_cast |
| Date: | Mon, 23 Oct 2017 14:47:32 +0000 |
| Message-ID: | <e53af017e2d84c40bb763073b4d3fd00@SFHDAG5NODE3.st.com> |
| x-ms-exchange-transport-fromentityheader: | Hosted |
| MIME-Version: | 1.0 |
| X-Proofpoint-Virus-Version: | vendor=fsecure engine=2.50.10432:,, definitions=2017-10-23_06:,, signatures=0 |
--_002_e53af017e2d84c40bb763073b4d3fd00SFHDAG5NODE3stcom_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hello,
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 Cygwin=
distribution but I cannot test other mingw64 distributions so let me start=
reporting the issue here...
Once said that, I'm open to any suggestions for better reporting place...
I'm not an expert in C and even less in C++ so I hope to not generate stupi=
d noise... but the same code was compiling fine with previous version (5.4)=
...
The attached file is the simplest example that triggers the issue.
If I try to compile with "x86_64-w64-mingw32-gcc -o test.exe test.cpp" the =
output is the following
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);
^~~~~~~~~~~~~
While, if I try to compile with "i686-w64-mingw32-gcc -o test.exe test.cpp"=
the output is the following
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);
^~~~~~~~~~~~
The test is effectively build to always fail but the current behavior is ex=
actly the opposite of what I was expecting:
x86_64 complains with (-1LL) cast while I was expecting it to fail on (-1L)
i686 complains with (-1L) cast while I was expecting it to fail on (-1LL)
Just to complete the picture, my environment is:
Windows 7 machine
Latest Cygwin (updated today 23 -Oct-2017)
Regards,
Paolo.
--_002_e53af017e2d84c40bb763073b4d3fd00SFHDAG5NODE3stcom_
Content-Type: text/plain; name="test.cpp"
Content-Description: test.cpp
Content-Disposition: attachment; filename="test.cpp"; size=387;
creation-date="Mon, 23 Oct 2017 12:36:49 GMT";
modification-date="Mon, 23 Oct 2017 14:04:16 GMT"
Content-Transfer-Encoding: base64
I2luY2x1ZGUgPHdpbmRvd3MuaD4KI2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQg
bWFpbiAoaW50IGFyZ2MsIGNoYXIgKiphcmd2KSB7CiNpZmRlZiBfV0lONjQg
CiAgc3RhdGljIGNvbnN0ZXhwciB2b2lkKiB0ZXN0MSA9ICh2b2lkKikoLTFM
KTsKICBzdGF0aWMgY29uc3RleHByIHZvaWQqIHRlc3QyID0gKHZvaWQqKSgt
MUxMKTsKCiAgcHJpbnRmKCIlbGx4LCAlbGx4XG4iLCB0ZXN0MSwgdGVzdDIp
OwojZWxzZQogIHN0YXRpYyBjb25zdGV4cHIgdm9pZCogdGVzdDEgPSAodm9p
ZCopKC0xTEwpOwogIHN0YXRpYyBjb25zdGV4cHIgdm9pZCogdGVzdDIgPSAo
dm9pZCopKC0xTCk7CgogIHByaW50ZigiJWx4LCAlbHhcbiIsIHRlc3QxLCB0
ZXN0Mik7CiNlbmRpZgoKcmV0dXJuIDA7Cgp9
--_002_e53af017e2d84c40bb763073b4d3fd00SFHDAG5NODE3stcom_
Content-Type: text/plain; charset=us-ascii
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
--_002_e53af017e2d84c40bb763073b4d3fd00SFHDAG5NODE3stcom_--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |