Compile time warnings which maybe critical to fix: /var/tmp/portage/gcc-4.1.0/work/gcc-4.1.0/libgfortran/intrinsics/signal.c: In function 'signal_sub': /var/tmp/portage/gcc-4.1.0/work/gcc-4.1.0/libgfortran/intrinsics/signal.c:52: warning: cast from pointer to integer of different size /var/tmp/portage/gcc-4.1.0/work/gcc-4.1.0/libgfortran/intrinsics/signal.c: In function 'signal_sub_int': /var/tmp/portage/gcc-4.1.0/work/gcc-4.1.0/libgfortran/intrinsics/signal.c:73: warning: cast to pointer from integer of different size /var/tmp/portage/gcc-4.1.0/work/gcc-4.1.0/libgfortran/intrinsics/signal.c:73: warning: cast from pointer to integer of different size /var/tmp/portage/gcc-4.1.0/work/gcc-4.1.0/libgfortran/intrinsics/signal.c:75: warning: cast to pointer from integer of different size there are probably more I didn't catch them all and logging is turned off.
These warnings are semi expected in that signal is expected not to work with 64bit, this is due to g77 compatibility.
Yes, this is confirmed. I'm not sure what is the less dirty way to make the warnings disappear (and not fix the code, which is, as Andrew said, expected not to work well on 64bits platforms).
*** Bug 29005 has been marked as a duplicate of this bug. ***
Andrew, The comment... These warnings are semi expected in that signal is expected not to work with 64bit, this is due to g77 compatibility. ..is confusing. If this is the case, why don't we use preprocessor statements to detect the 64-bit builds and eliminate the warning in those cases only. Especially as I don't think the warnings occur in 32-bit builds of libgfortran. Is there really any legacy g77 code built at 64-bit to support? Jack
(In reply to comment #4) > Andrew, > The comment... > > These warnings are semi expected in that signal is expected not to work with > 64bit, this is due to g77 compatibility. > > ..is confusing. How is it confusing? G77 supported 64bit on most targets before gfotran was even released. Alpha-linux-gnu was a 64bit target where g77 was supported. x86_64-linux-gnu, ia64-linux-gnu and powerpc64-linux-gnu are others. It is not like 64bit support in GCC is new at all.
The confusing part was the words "signal is expected not to work with 64-bit" which left the impression that it only works with 32-bit currently.
Subject: Bug 26540 Author: fxcoudert Date: Sun Oct 8 14:27:22 2006 New Revision: 117556 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117556 Log: PR libfortran/26540 * intrinsics/signal.c (signal_sub, signal_sub_int): Use intptr_t if available to cast function pointers to int and back. * configure.ac: Check for intptr_t. * config.h.in: Regenerate. * configure: Regenerate. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/config.h.in trunk/libgfortran/configure trunk/libgfortran/configure.ac trunk/libgfortran/intrinsics/signal.c
Since it's only a build-time warning, I won't backport that patch to 4.1 and I close the PR.