Re: Pointer to function gives illegal operation (MSC6)

From: Rob Mitchell (dwntrdr_at_bigfoot.com)
Date: 03/16/04


Date: 16 Mar 2004 10:15:10 -0800

Mike;

That would be a good idea except that: there's apparently pointer
conversion going on, if I reduce the code size, most likely it will
never duplicate. It appears that in the second code segment, it
thinks the pointer to function is "far" when it is actually "near". I
was hoping mostly that someone had come across the same problem and
thus recognized it right away and give pointers on how to resolve it.

Thanks...
Rob.

"Mike Wahler" <mkwahler@mkwahler.net> wrote in message news:<F9s5c.23179$%06.8008@newsread2.news.pas.earthlink.net>...
> "Rob Mitchell" <dwntrdr@bigfoot.com> wrote in message
> news:e7319688.0403151538.697cfede@posting.google.com...
> > Hi all;
> >
> > I've come across a particularly stumping problem... hoping someone else
> has
> > encountered it and knows a fix / workaround...
>
> Post compilable code, and maybe we can help.
> (Try to strip it down to only what is needed to
> reproduce the problem).
>
> -Mike



Relevant Pages

  • Re: ptr conversions and values
    ... >> each pointer pointed to a byte, ... Without that conversion, a pointer that points to an N-byte ... pointers to incomplete array types must indicate the start of the array ... >> It's all right, mostly equivalent with the previous one, representation ...
    (comp.std.c)
  • Re: typecast internals
    ... (snip of description of floating point formats) ... >>that the value is of the appropriate pointer type, ... > much of a conversion operation as arithmetic-type casts. ...
    (comp.lang.c)
  • Re: C variable retyping
    ... whose type is given by the cast. ... >an integer, no conversion is done, and c is used, within the ... In other words, you may take a pointer value, then use a cast to ... which is probably why the C99 folks decided to allow it ...
    (comp.lang.c)
  • Re: cast from int** to int*
    ... "A pointer to an object or incomplete type may be converted to a pointer ... The only types for which you can derive the fact that the alignment requirement must 1 byte are the character types. ... The alignment requirements for any other types (such as 'int' and 'int*') are unspecified by the standard, and can be greater than 1 byte. ... conversion of &p to may have undefined behavior. ...
    (comp.lang.c)
  • Re: ptr conversions and values
    ... >>> pointer points to an object consisting of a number of bytes. ... Note that I'm not relying on any conversion here, ... It's all right, mostly equivalent with the previous one, representation ... There are no values of an array type. ...
    (comp.std.c)