-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RealPPPort.xs: "cast from pointer to integer of different size" using MinGW-w64 #20080
Comments
(Note: I don't have Windows, so my own ability to diagnose this problem is limited.) Can you provide a bit more context for the build-time warning you posted above? For instance, can you post some of the commands which For example, when on FreeBSD I search for
Is your area similar to that one? |
Do you have the capability of trying any later version of I ask because it's my impression that certain build-time warnings I got with older versions of |
Thanks for the reply. Just where I can cope with quick. | Do you have the capability of trying any later version of gcc here? No. The gcc binaries I was able to find were up to 8.3. |
The warning isn't wrong (unsigned long on Windows would be 32 bits, and the pointer 64 bits), just rather useless. |
For more recent versions (of both gcc and mingw runtime) see https://winlibs.com/ . If you use gcc-12.1.0, the 64-bit version won't build perl-5.36.0 or earlier unless you patch the source (see #19824). Update: However, it builds current blead . AFAIK, their earlier versions of gcc avoid all of those issues. Cheers, |
It's not apparent to me why warning about casting a pointer to an unsigned long is useless. Cheers, |
Thank you all for your replies.
Yes. It was as follows.
I also attached build.log. (The log file is converted to utf8 because a few Japanese sentences are mixed in places. Several other warning messages are also output.)
I think I have a warning message output but it is roughly similar. I will try gcc-10 tomorrow or the next day or two. @Leont @sisyphus |
Hello everyone. I have been able to confirm that both gcc-10 and gcc-11 produce the same warning as gcc-8.1. Overview of Execution Commands for gcc-10:
Relevant part of the log:
Full log (copy command results translated into English): I incidentally also tried it with gcc-11. Overview of Execution Commands for gcc-11:
Relevant part of the log:
Full log (copy command results translated into English): Thank you, |
The thing is that, on 64-bit Windows, the condition And it could only return FALSE when it should have returned TRUE if the value held by the pointer overflows 32-bits && the low 32 bits are all zero - which is a scenario that seems most unlikely. So, @twata1, I think it's pretty safe to ignore them. Cheers, |
Agreed |
Ok. I ignore the warning ( and if I ever have the opportunity to cast longsize, I will rely on PTR2UV. ) |
Turns out that this is a duplicate of Dual-Life/Devel-PPPort#107 .
Cheers, |
Actually, that might be incorrect. Right here is the more appropriate forum if I understand https://perldoc.perl.org/perlsource correctly. Cheers, |
Thank you for your suggestion. I did not know Dual-Life module GitHub repository existed. I will close this ticket. |
Description
I'am building Perl 5.37.2 on Windows 8.1 64 bit using MinGW-w64 (gcc (x86_64-posix-sjlj-rev0, Built by MinGW-W64 project) 8.1.0).
One of the build warnings is:
Steps to Reproduce
Download perl-5.37.2.tar.gz from metacpan.
Extract from perl-5.37.2.tar.gz to C:\Perl64.
On command promput:
Expected behavior
It is the suppression of warnings.
Perl configuration
The text was updated successfully, but these errors were encountered: