[TUHS] C++ / Kernel

Paul Winalski paul.winalski at gmail.com
Mon Aug 27 02:34:34 AEST 2018


On 8/24/18, Steffen Nurpmeso <steffen at sdaoden.eu> wrote:
>
> Though even more unfortunate i am, since this union trick is often
> the only way to be able to do proper a.k.a. allowed type
> conversion, where the standard text forbids something quick and
> easy, casting of or to function pointers in C++ comes to mind
> spontaneously.  (The linked story also tries to go via (char*) to
> a desired type, but the compiler seems to be too neat.  And even
> if this is a bug, of course...)

One of the complaints about DEC's C99 compiler for Ultrix was that it
was too didactic in its enforcement of the C99 standard.  One customer
called it the Rush Limbough of compilers, because it was extremely
conservative and you couldn't argue with it.

Function pointers can be tricky, as they might not be simple pointers
to a sequence of instructions.  On Itanium, for example, a C
pointer-to-function points to a descriptor for the function, not the
function code itself.

-Paul W.



More information about the TUHS mailing list