Bug 26540 - [4.1 only] intrinsics/signal.c warnings
Summary: [4.1 only] intrinsics/signal.c warnings
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libfortran (show other bugs)
Version: 4.1.0
: P3 minor
Target Milestone: 4.2.0
Assignee: Francois-Xavier Coudert
URL:
Keywords:
: 29005 (view as bug list)
Depends on:
Blocks: 22423
  Show dependency treegraph
 
Reported: 2006-03-03 08:30 UTC by Jon Daniel
Modified: 2006-10-13 07:22 UTC (History)
3 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build: x86_64-pc-linux-gnu
Known to work: 4.2.0
Known to fail: 4.1.2
Last reconfirmed: 2006-10-08 14:28:27


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Daniel 2006-03-03 08:30:52 UTC
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.
Comment 1 Andrew Pinski 2006-03-03 13:42:26 UTC
These warnings are semi expected in that signal is expected not to work with 64bit, this is due to g77 compatibility.
Comment 2 Francois-Xavier Coudert 2006-05-21 14:11:19 UTC
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).
Comment 3 Andrew Pinski 2006-09-10 18:55:55 UTC
*** Bug 29005 has been marked as a duplicate of this bug. ***
Comment 4 Jack Howarth 2006-09-10 19:04:53 UTC
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
Comment 5 Andrew Pinski 2006-09-10 19:08:48 UTC
(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. 
Comment 6 Jack Howarth 2006-09-10 19:24:34 UTC
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.
Comment 7 Francois-Xavier Coudert 2006-10-08 14:27:34 UTC
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

Comment 8 Francois-Xavier Coudert 2006-10-13 07:22:29 UTC
Since it's only a build-time warning, I won't backport that patch to 4.1 and I close the PR.