From: Vladimir <vt...@in...> - 2002-07-18 09:56:25
|
/* * * $ sdcc -c arst.c * arst.c(10):error *** Pointer required * arst.c(10):error *** code not generated for 'f' due to previous errors * */ struct s{ int x; }; struct s as[5]; int f() { (as+1)->x=0; } #if 0 /* What I'm using to fix it (it has worked for me), I release * it to the public domain): * In SDCCast.c in function decorateType, says: */ case PTR_OP: /* if not pointer to a structure */ if (!IS_PTR (LTYPE (tree))) { werror (E_PTR_REQD); goto errorTreeReturn; } /* * Change condition in if with: */ if (!IS_PTR (LTYPE (tree)) && !IS_ARRAY(LTYPE(tree))) #endif |
From: Bernhard H. <ber...@be...> - 2002-07-18 11:02:08
|
> * arst.c(10):error *** Pointer required > * arst.c(10):error *** code not generated for 'f' due to previous errors > if (!IS_PTR (LTYPE (tree)) && !IS_ARRAY(LTYPE(tree))) Fixed in SDCCast.c 1.148. Thanks Vladimir, good work! Bernhard |