email7373388@kinglibrary.net wrote:
> I'm getting this when I try to compile:
> error C2215: ':>' operator only for objects based on 'void'
>
>
> This is the line that's blowing up:
>
> return (BYTE *) MAKE_FAR (0x34, address);
>
>
> And this is the macro that defines the thing:
>
> #define MAKE_FAR( var1, var2) (((unsigned short)( var1)):>((void
> __near *)( var2 )))
It looks like the macro was written for a C-like language
that isn't exactly C, but "C with decorations." In C as
defined by ISO, :> is either a syntax error (older versions)
or equivalent to ] (newer versions), but in neither case does
the macro make C-sense.
Probably, your C-like compiler has its origins in the time
before :> entered the official language, and co-opted :> for
its own purposes -- it seemed safe enough, no doubt, since :>
could not occur in a legal C program of the time, so giving it
a special meaning wouldn't alter the treatment of legal C.
Unfortunately, other people coveted :> too, and they wrote the
next version of the Standard ...
All I can suggest is that you search the documentation for
your compiler to see what meaning it attaches to :> and to find
out what rules are being broken. Maybe there's a section on
"Language Extensions" or "Nifty Features" or something. But
unfortunately, :> as used in the macro isn't really C at all,
and only someone familiar with the "decorated C" compiler will
be able to you.
--
Eric.Sosman@sun.com