9 unsigned char array
[512-3*sizeof(int)];
12 int check_ptr(unsigned char *p
, struct s
*sp
)
14 if (p
> sp
->array
+ 400) /* Converting the array to its address for the add */
15 return 1; /* incorrectly used the size of the array to */
16 else /* determine the size of the resulting pointer. */
20 #if !defined( __SDCC_pdk14) && !defined( __SDCC_pdk15) && !defined( __SDCC_pic14) // Lack of memory
21 __xdata
struct s teststruct
;
26 #if !defined( __SDCC_pdk14) && !defined( __SDCC_pdk15) && !defined( __SDCC_pic14) // Lack of memory
27 struct s
* sp
= &teststruct
;
29 ASSERT (check_ptr(&(sp
->array
[400]),sp
) == 0);
30 ASSERT (check_ptr(&(sp
->array
[401]),sp
) == 1);