[Info-vax] DEC C 64/32 bit pointer conversion question
Arne Vajhøj
arne at vajhoej.dk
Fri Sep 13 16:37:51 EDT 2019
On 9/13/2019 9:32 AM, John E. Malmberg wrote:
> It seems to work well when all the code is in the same module.
>
> In my actual library that uses this same code it is failing by producing
> a negative 32 bit pointer for these values.
>
> So I am trying to figure out what I am doing wrong.
> It looks like the compiler is generating different code when everything
> is in one source compilation then when the source pointer is from a
> separately compiled module and destination pointer to be updated is
> passed by address from the same separately compiled module.
>
> If I cast the result from the masked 64 bit pointer to an unsigned, I
> get the correct number.
>
> When I then try to put that unsigned number in a 32 bit char pointer, I
> get a negative address.
>
> Everything I have tried so far in the actual code results in a negative
> 32 bit pointer being saved.
>
> I can not reproduce it in an example that only uses one compilation
> module. In a single compilation I get the correct 32 bit pointer value
> returned.
Can you provide a two module example showing the problem?
Arne
More information about the Info-vax
mailing list