public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* 32 bit pointers on Alpha Linux?
@ 2000-03-09 12:30 Brad Lucier
  2000-03-09 17:17 ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Brad Lucier @ 2000-03-09 12:30 UTC (permalink / raw)
  To: gcc; +Cc: Brad Lucier

ld on Alpha binutils now offers -taso; there's a way to get malloc
in glibc to return pointers in the lower 32 bits of the address space.

How do I get gcc to generate code for 32 bit pointers on Alpha?

Brad Lucier

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

* Re: 32 bit pointers on Alpha Linux?
  2000-03-09 12:30 32 bit pointers on Alpha Linux? Brad Lucier
@ 2000-03-09 17:17 ` Richard Henderson
  2000-03-09 18:13   ` Brad Lucier
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2000-03-09 17:17 UTC (permalink / raw)
  To: Brad Lucier; +Cc: gcc

On Thu, Mar 09, 2000 at 03:30:09PM -0500, Brad Lucier wrote:
> How do I get gcc to generate code for 32 bit pointers on Alpha?

You can't. 

Moreover, -taso on DU doesn't give you 32-bit pointers either.  It
just makes sure that you can cast to int and back without problem.

What you're thinking of is -taso-short, which requires all system
headers to be specially annotated so that we get a mix of 32-bit
and 64-bit pointers.  GCC will probably never support multiple
simultaneous pointer sizes -- it is a whale load of work.


r~

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

* Re: 32 bit pointers on Alpha Linux?
  2000-03-09 17:17 ` Richard Henderson
@ 2000-03-09 18:13   ` Brad Lucier
  2000-03-09 18:18     ` Richard Henderson
  2000-03-09 18:26     ` Casey Cady
  0 siblings, 2 replies; 5+ messages in thread
From: Brad Lucier @ 2000-03-09 18:13 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Brad Lucier, gcc

> 
> On Thu, Mar 09, 2000 at 03:30:09PM -0500, Brad Lucier wrote:
> > How do I get gcc to generate code for 32 bit pointers on Alpha?
> 
> You can't. 
> 
> Moreover, -taso on DU doesn't give you 32-bit pointers either.  It
> just makes sure that you can cast to int and back without problem.

OK, can I interpret what you're saying is that
I don't need 32-bit pointers (but I do get a lot
of 64-bit pointers <-> 32-bit ints warnings)? 

That's really all I want---to store a pointer in an int, convert it
back, and have it work.

Brad

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

* Re: 32 bit pointers on Alpha Linux?
  2000-03-09 18:13   ` Brad Lucier
@ 2000-03-09 18:18     ` Richard Henderson
  2000-03-09 18:26     ` Casey Cady
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2000-03-09 18:18 UTC (permalink / raw)
  To: Brad Lucier; +Cc: gcc

On Thu, Mar 09, 2000 at 09:13:38PM -0500, Brad Lucier wrote:
> OK, can I interpret what you're saying is that
> I don't need 32-bit pointers

If you were just looking to build some dusty deck, yes.
If you were looking for the space savings from having
smaller pointers in memory, you're out of luck.

> (but I do get a lot of 64-bit pointers <-> 32-bit ints warnings)? 

Yes, but they are harmless given that you'll be using -taso
when linking.


r~

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

* Re: 32 bit pointers on Alpha Linux?
  2000-03-09 18:13   ` Brad Lucier
  2000-03-09 18:18     ` Richard Henderson
@ 2000-03-09 18:26     ` Casey Cady
  1 sibling, 0 replies; 5+ messages in thread
From: Casey Cady @ 2000-03-09 18:26 UTC (permalink / raw)
  To: Brad Lucier; +Cc: Brad Lucier, gcc

At 09:13 PM 3/9/00 -0500, Brad Lucier wrote:
>> 
>> On Thu, Mar 09, 2000 at 03:30:09PM -0500, Brad Lucier wrote:
>> > How do I get gcc to generate code for 32 bit pointers on Alpha?
>> 
>> You can't. 
>> 
>> Moreover, -taso on DU doesn't give you 32-bit pointers either.  It
>> just makes sure that you can cast to int and back without problem.
>
>OK, can I interpret what you're saying is that
>I don't need 32-bit pointers (but I do get a lot
>of 64-bit pointers <-> 32-bit ints warnings)? 
>
>That's really all I want---to store a pointer in an int, convert it
>back, and have it work.
>
>Brad


(shudder)  that's a bad scene.  Casting pointers to int's is always a bad
idea.  Casting pointers to ints on a system with 64 bit pointers is a
REALLY bad idea.  Sorry I don't have any useful answers for you except that
your code will be better in the long run if you don't cast from pointer to
int and back. 

Casey

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

end of thread, other threads:[~2000-03-09 18:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-09 12:30 32 bit pointers on Alpha Linux? Brad Lucier
2000-03-09 17:17 ` Richard Henderson
2000-03-09 18:13   ` Brad Lucier
2000-03-09 18:18     ` Richard Henderson
2000-03-09 18:26     ` Casey Cady

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