/*********************************************************************/
/* */
/* This program demonstrates what I believe is a bug in */
/* Watcom C 10.0a. If you compile this program as */
/* "wcl386 prog.c" and run it it says "mismatch" which
I don't */
/* think should happen. I have stripped it down to the */
/* minimum required to demonstrate the problem. */
/* */
/* If you have a fix for this, please contact Paul Edwards, */
/* Fidonet 3:711/934. */
/* */
/*********************************************************************/
#include
#include
struct mystruct
{
void __far16 * x;
};
struct mystruct abc;
struct mystruct __far16 * def;
void __far16 * myptr;
long g;
void foo(void __far16 *p) { return; }
int main(void)
{
def = &abc;
def->x = &g;
foo(&abc); /* comment out this line for a similar bug!!!!!! */
myptr = (void __far16 *)def->x;
if (memcmp(&myptr, &def->x, 4) != 0)
{
printf("mismatch\n");
}
else
{
printf("ok\n");
}
return (0);
}
@EOT:
--- Mksmsg
* Origin: none (3:711/934.9)
|