Am 01.04.2014 00:11, schrieb Steve Comstock:
On 3/31/2014 4:02 PM, Bernd Oppolzer wrote:
We discussed this further with some co-workers on my customers site.

There are some more aspects of this discussion:

a) the C language manual at one certain point states what are pointers
acceptable
to C and what are not. From the wording there it sounds as if pointers
that come
from parameters from other languages (not C) were not acceptable to C -
only
addresses resulting from parameters from other C functions !!! If this
is true ...
how do I do inter-language calls between PL/1 and C successfully?

Ahem.

http://www.trainersfriend.com/Language_Environment_courses/m520descr.htm


-Steve Comstock

How do you solve the problem that a pointer coming from a PL/1 module
(or ASSEMBLER) and possibly having the high order bit on is not accepted
from the C module as a valid pointer and that the results, if you use this pointer,
are "unpredictable" or "undefined", as stated by the C manuals? And:
if you try to clean the first bit of this pointer by casting it to an unsigned int and switching the bit off, then you get this logic removed from the object code
by the optimizer, because the optimizer (of the C compiler) THINKS that a
C pointer never has the high order bit set, so there is no need to execute
this logic?

In the past, we were able to clean the first bit, because the logic was NOT
removed, but from the compiler error we faced in the last few days it seems
that now the C compiler (at OPT(2)) believes that all pointers are limited to 31 bit and that logic dealing with the high order bit is unnecessary and can
therefore be removed ...

Kind regards

Bernd

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to