From: "Ernest L. Williams Jr." <ernesto@ornl.gov>
To: GCC-Help <gcc-help@gcc.gnu.org>
Subject: Moving to AMD64 bit and porting issues
Date: Sat, 22 Oct 2005 05:26:00 -0000 [thread overview]
Message-ID: <1129958772.5288.22.camel@lion> (raw)
Hi,
I have been going down the 64-bit only path for building C/C++
applications. Of course, I have been running into portability issues
when converting older 32-bit apps to build/run on a 64-bit OS.
Specifically in my case; I am using an AMD64 running RedHat Enterprise
Linux WS Release 4 update 2 (RHEL4 WS up2). So, the version of GCC
follows:
==========================================================================
[williams@sns-hp-eval1 medm]$ gcc -v
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.4/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --
disable-checking --with-system-zlib --enable-__cxa_atexit --disable-
libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)
===========================================================================
When I compile an old 32-bit app, the build works but at run-time it
crashes and burns. Well, it has to do with using "NULL" versus "0"
Now here is a portability question:
Should we use "NULL" to represent a null pointer or "0" to represent a
null pointer?
When I replace "0" with NULL in the code the crash no longer occurred.
What else can I expect when moving 32-bit apps to the 64-bit platform.
next reply other threads:[~2005-10-22 5:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-22 5:26 Ernest L. Williams Jr. [this message]
2005-10-24 10:24 ` Alex J. Dam
2005-10-24 10:33 ` random
2005-10-24 10:37 ` Ernest L. Williams Jr.
2005-10-24 19:02 ` Ian Lance Taylor
2005-11-04 11:54 ` Segher Boessenkool
2005-11-04 12:05 ` Ernest L. Williams Jr.
2005-11-04 12:35 ` Segher Boessenkool
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1129958772.5288.22.camel@lion \
--to=ernesto@ornl.gov \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).