public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bill C Riemers <bcr@feynman.com>
To: Robert Zitoun <zitoun@lapp.in2p3.fr>
Cc: help-gcc@gnu.org
Subject: Re: How can I force long words to be 32 bits on DEC-ALPHA ?
Date: Wed, 16 Feb 2000 16:49:00 -0000	[thread overview]
Message-ID: <38AB4593.3A278D84@feynman.com> (raw)
In-Reply-To: <38AAED04.393536C8@lapp.in2p3.fr>

Robert Zitoun wrote:
> 
> I have a C-program running on HP in which there are a lot of "unsigned
> long*" pointers.
> I try to port this program to DEC-ALPHA, but here,  Unsigned long
> pointers point to 64 bit words.
> 
> Is there any way to force the compiler to understand "long" as 32 bit on
> any machine ? (DEC ALPHA especially)
> 
>                              Thank you for your help
> 
>                                                    Robert

If you change the size of pointers, you are going have serious problems.
How can you possibly hope to address 64 bit memory space with 32 bit pointers????

Perhaps you aren't using them as pointers at all, but pointer offsets.  In that
case I suspect you will have to modify the code just to use (long int) as indexes, 
as any automatic porting procedure will get you into trouble.

On SGI machines there is a -n32 option, but I think that only sets the default
int size.


				Bill

WARNING: multiple messages have this Message-ID
From: Bill C Riemers <bcr@feynman.com>
To: Robert Zitoun <zitoun@lapp.in2p3.fr>
Cc: help-gcc@gnu.org
Subject: Re: How can I force long words to be 32 bits on DEC-ALPHA ?
Date: Sat, 01 Apr 2000 00:00:00 -0000	[thread overview]
Message-ID: <38AB4593.3A278D84@feynman.com> (raw)
Message-ID: <20000401000000.ayuGpzySFRuu7N5gQi5UcPr-u_GLbmB0usgxi90m-ZU@z> (raw)
In-Reply-To: <38AAED04.393536C8@lapp.in2p3.fr>

Robert Zitoun wrote:
> 
> I have a C-program running on HP in which there are a lot of "unsigned
> long*" pointers.
> I try to port this program to DEC-ALPHA, but here,  Unsigned long
> pointers point to 64 bit words.
> 
> Is there any way to force the compiler to understand "long" as 32 bit on
> any machine ? (DEC ALPHA especially)
> 
>                              Thank you for your help
> 
>                                                    Robert

If you change the size of pointers, you are going have serious problems.
How can you possibly hope to address 64 bit memory space with 32 bit pointers????

Perhaps you aren't using them as pointers at all, but pointer offsets.  In that
case I suspect you will have to modify the code just to use (long int) as indexes, 
as any automatic porting procedure will get you into trouble.

On SGI machines there is a -n32 option, but I think that only sets the default
int size.


				Bill

  reply	other threads:[~2000-02-16 16:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-16 10:31 Robert Zitoun
2000-02-16 16:49 ` Bill C Riemers [this message]
2000-04-01  0:00   ` Bill C Riemers
2000-04-01  0:00 ` Robert Zitoun

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=38AB4593.3A278D84@feynman.com \
    --to=bcr@feynman.com \
    --cc=help-gcc@gnu.org \
    --cc=zitoun@lapp.in2p3.fr \
    /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).