home *** CD-ROM | disk | FTP | other *** search
- #if 0
- From: Joe Huffman <joe@proto.com>
- Subject: constant near pointers for 386
- Date: Thu, 23 May 91 11:38:17 PDT
- Status: Fixed in 3.0
- #endif
-
- #include <stdio.h>
-
- /* 'ztc bug -mx' Ignores the constant 0xA0000 in the first situation. */
-
- char *table[10];
-
- int main()
- {
- int i;
-
- for(i = 0; i < 10; i++)
- {
- unsigned long int offset = i * 0x1000L;
- #if 1
- table[i] = (char *)0xA0000 + (offset & 0xffff);
- #else
- table[i] = (char *)(offset & 0xffff) + 0xA0000;
- #endif
- printf("table[%d] = %p\n", i, table[i]);
- }
- return 0;
- }
-
-