From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 22854 invoked from network); 16 Nov 1998 03:50:20 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 16 Nov 1998 03:50:20 -0000 Received: from saaz.cam.nist.gov (donahue@saaz.cam.nist.gov [129.6.88.116]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id WAA07783 for ; Sun, 15 Nov 1998 22:50:19 -0500 Received: (from donahue@localhost) by saaz.cam.nist.gov (8.8.5/8.8.5) id WAA26382; Sun, 15 Nov 1998 22:50:20 -0500 Date: Sun, 15 Nov 1998 22:50:20 -0500 Message-Id: <199811160350.WAA26382@saaz.cam.nist.gov> From: "Michael J. Donahue" To: axp-list@redhat.com In-reply-to: <98111320401602.04239@apollo.bcas.de> (message from Heinz Ulrich Stille on Fri, 13 Nov 1998 20:37:42 +0100) Subject: Re: Any C++ on Alpha gfurus out there? Reply-to: michael.donahue@nist.gov (Michael Donahue) Heinz Ulrich Stille 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/