[Info-vax] GCC for VMS, was: Re: fortran compiler roadmap?

Craig A. Berry craigberry at mac.com.invalid
Mon Apr 29 20:28:25 EDT 2013


In article <klmspl$j63$1 at dont-email.me>,
 Simon Clubley <clubley at remove_me.eisner.decus.org-Earth.UFP> wrote:

> Ok, I played with it a bit more this evening and I've figured it out.
> It turns out my hunch about the 32 bit versus 64 bit issue was right.
> 
> It turns out DEC C by default is basically _still_ a 32 bit compiler
> with 64 bit addons (which I had not fully appreciated; I don't use
> DEC C all that much these days), but gcc (when built using the
> alpha64-dec-vms triplet) is a pure 64 bit compiler through and through.

There are various definitions of 64-bitness; pointer size is only one of 
them.  That's kind of a side note as I agree with your findings.

If you read the DEC C docs on 

#pragma pointer_size system_default

you'll see that the behavior you are observing is how DEC C behaves by 
default on Tru64, but not on OpenVMS.  

> That makes the DEC C headers incompatible with gcc when you have, for
> example, pointers in structs and want to use that struct with existing
> functions in the DEC C RTL.

I'm pretty sure the same or similar headers worked with Tru64.  Of 
course, regardless of platform, DEC C can do either 32-bit or 64-bit 
pointers according to what you tell it.  Not sure if gcc can do that.

stat.h has this near the beginning:


#if __INITIAL_POINTER_SIZE
#   pragma __pointer_size __save
#   pragma __pointer_size 32
#endif

and then about 80% towards the end says:


/*
**  We are done defining things which must always be short pointers.  If
**  the user has used /pointer_size=short or /pointer_size=long, we will
**  allow long pointers to be used in function calls.
*/
#if __INITIAL_POINTER_SIZE
#   pragma __pointer_size 64
#endif

So it seems that stat.h definitely has the requirement to switch back 
and forth between different pointer sizes.  If gcc can't do that, that 
sounds like a real problem.



More information about the Info-vax mailing list