From: "Michael J. Donahue" <donahue@saaz.cam.nist.gov>
To: axp-list@redhat.com
Subject: Re: Any C++ on Alpha gfurus out there?
Date: Sun, 15 Nov 1998 22:50:20 -0500 [thread overview]
Message-ID: <199811160350.WAA26382@saaz.cam.nist.gov> (raw)
In-Reply-To: <98111320401602.04239@apollo.bcas.de> (message from Heinz Ulrich Stille on Fri, 13 Nov 1998 20:37:42 +0100)
Heinz Ulrich Stille <Heinz.Ulrich.Stille@mbi-os.de> writes:
>On Fri, 13 Nov 1998, Brian E.W. Wood wrote:
>> {
>> _wd * wd = (_wd *)m_menuFactoryItems[k].callback_action;
>> if (wd && (wd->m_id==id))
>> return m_menuFactoryItems[k].path;
>> }
>
>What type is callback_action? 32 or 64 bit?
Ulrich's question is the first thing to check. Anyone with experience
porting 32-bit apps to the Alpha knows that pointer casts are red flags.
Easy thing to try: remove the pointer cast, i.e.,
_wd * wd = m_menuFactoryItems[k].callback_action;
and compile with -Wall. If callback_action is a void*, then you won't
need the cast. If not, then dimes to doughnuts it is a 32-bit int.
Passing a * through an 'int' works on a 32-bit OS (like Linux/x86), but
is sure to segfault on Linux/axp.
In any event, the compiler warning message should inform you what conversion
is going on here, without having to read through the code.
-m
--
Michael J. Donahue
National Institute of Standards and Technology
Mathematical & Computational Sciences Division
Bldg 820, Rm 365
Gaithersburg, MD 20899
email: michael.donahue@nist.gov
voice: (301) 975-5424
fax: (301) 990-4127
web: http://math.nist.gov/mcsd/Staff/MDonahue/
next prev parent reply other threads:[~1998-11-16 3:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-13 19:10 Any C++ on Alpha gfurus out there? Brian E.W. Wood
1998-11-13 19:17 ` Nicholas Sallembian
1998-11-13 19:25 ` B. James Phillippe
1998-11-13 21:48 ` Nicholas Sallembian
1998-11-14 1:06 ` Bob McElrath
1998-11-14 13:20 ` sterwill
1998-11-14 17:37 ` Brian E.W. Wood
1998-11-13 19:26 ` Anders Hammarquist
1998-11-13 19:37 ` Heinz Ulrich Stille
1998-11-16 3:50 ` Michael J. Donahue [this message]
1998-11-16 13:15 ` Stefan Schroepfer
1998-11-16 13:45 ` Paul Tomblin
1998-11-16 14:24 ` Stefan Schroepfer
1998-11-16 14:43 ` Leo
-- strict thread matches above, loose matches on Subject: below --
1998-11-16 14:49 Leo
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox