public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How can I force long words to be 32 bits on DEC-ALPHA ?
@ 2000-02-16 10:31 Robert Zitoun
  2000-02-16 16:49 ` Bill C Riemers
  2000-04-01  0:00 ` Robert Zitoun
  0 siblings, 2 replies; 4+ messages in thread
From: Robert Zitoun @ 2000-02-16 10:31 UTC (permalink / raw)
  To: help-gcc

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

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

* Re: How can I force long words to be 32 bits on DEC-ALPHA ?
  2000-02-16 10:31 How can I force long words to be 32 bits on DEC-ALPHA ? Robert Zitoun
@ 2000-02-16 16:49 ` Bill C Riemers
  2000-04-01  0:00   ` Bill C Riemers
  2000-04-01  0:00 ` Robert Zitoun
  1 sibling, 1 reply; 4+ messages in thread
From: Bill C Riemers @ 2000-02-16 16:49 UTC (permalink / raw)
  To: Robert Zitoun; +Cc: help-gcc

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

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

* Re: How can I force long words to be 32 bits on DEC-ALPHA ?
  2000-02-16 16:49 ` Bill C Riemers
@ 2000-04-01  0:00   ` Bill C Riemers
  0 siblings, 0 replies; 4+ messages in thread
From: Bill C Riemers @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Robert Zitoun; +Cc: help-gcc

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

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

* How can I force long words to be 32 bits on DEC-ALPHA ?
  2000-02-16 10:31 How can I force long words to be 32 bits on DEC-ALPHA ? Robert Zitoun
  2000-02-16 16:49 ` Bill C Riemers
@ 2000-04-01  0:00 ` Robert Zitoun
  1 sibling, 0 replies; 4+ messages in thread
From: Robert Zitoun @ 2000-04-01  0:00 UTC (permalink / raw)
  To: help-gcc

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

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

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-16 10:31 How can I force long words to be 32 bits on DEC-ALPHA ? Robert Zitoun
2000-02-16 16:49 ` Bill C Riemers
2000-04-01  0:00   ` Bill C Riemers
2000-04-01  0:00 ` Robert Zitoun

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