From: <no...@so...> - 2002-09-09 06:13:53
|
Bugs item #605902, was opened at 2002-09-07 04:57 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=605902&group_id=599 Category: None >Group: non bugs >Status: Closed >Resolution: Rejected Priority: 5 Submitted By: Felipe Massia Pereira (felmasper) >Assigned to: Bernhard Held (bernhardheld) Summary: non-pointer to pointer cast (bug?) Initial Comment: ~/src/test $ cat ptrass.c int main(void) { int *x; int y; x = (int *) y; /* x = *(int **) &y seems to work */ return 0; } ~/src/test $ sdcc ptrass.c ptrass.c:6: error: non-pointer type cast to generic pointer from type 'int' to type 'int generic * ' ptrass.c:8: error: code not generated for 'main' due to previous errors ---------------------------------------------------------------------- >Comment By: Bernhard Held (bernhardheld) Date: 2002-09-09 08:13 Message: Logged In: YES user_id=203539 SDCC can't fill in anything usefull for the memory region of the generic pointer. Therefore it's impossible to cast anything but 0 to a generic pointer. Hint: you can cast to e.g. (int xdata *). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=605902&group_id=599 |