public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Moving to AMD64 bit and porting issues
@ 2005-10-22  5:26 Ernest L. Williams Jr.
  2005-10-24 10:24 ` Alex J. Dam
  0 siblings, 1 reply; 8+ messages in thread
From: Ernest L. Williams Jr. @ 2005-10-22  5:26 UTC (permalink / raw)
  To: GCC-Help

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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-11-04 12:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-22  5:26 Moving to AMD64 bit and porting issues Ernest L. Williams Jr.
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

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).