261 =1 void FramRead(U8 IFRCpage, unsigned char xdata * xdata IFRCstore); *** WARNING C258 IN LINE 261 OF MCDEFS.H: 'IFRCstore': mspace on parameter ignored
oops twice - and the same goof (no tool) anyhow, I am not trying to specify "where function parameters are stored" but what it is. I have, on occasion, run afoul with the "universal mspace" that gives the 3 legged parameter and it riles me that you can not (be allowed to) specify exactly what you mean. Erik
"I am not trying to specify 'where function parameters are stored'" But you are - and that's the problem:
void FramRead(U8 IFRCpage, unsigned char xdata * xdata IFRCstore)
I think it is dawning on me. Before the call the contents of the pointer is sucked to the "parameter passing registers" and, at that time the location of the pointer is defined by the definition of the variable. However, the called function need know where the pointed to data is located (or will go crazy with overhead). This, however, does not change the "inconvenience" that you can not define the parameter by the same "modifiers" as the variable you include in the function call. For instance the above is called only with pointers defined by U8XX (a #define abbreviation of unsigned char xdata * xdata) and thus it seems natural to use U8XX in the call as well. Oh, well some like the mother, some like the daughter, I'll have to live with this. Erik
Imagine drawing a vertical line through the asterisk in a pointer declaration. Modifers to the left of the * apply to the thing pointed to. Modifiers to the right of the * apply to the pointer itself.
thing pointed to | pointer | unsigned char xdata * xdata IFRCstore | |
Drew, I know that BUT I like that parametres for function calls are defined identical to the values they refer to so, I can not do U8 xdata * xdata phred; U8 xdata * xdata ralph; and specify a function that only call with ralph and phred as ... (U8 xdata * xdata george) I DO see the irrelevance of the second xdata but then why not the first (OK, OK one is used inside, the other is not) My only beef is that you can not specify a function parameter IDENTICAL to the variables you use for that parameter. It is almost a kind of ENUM of the parameter type. I'll live with it OK Erik
"My only beef is that you can not specify a function parameter IDENTICAL to the variables you use for that parameter" Yes, but a function parameter is not identical to a variable - which is precisely why you can't do it! Ho hum!
Perhaps it would be useful to make this condition a warning ("mspace specifier for formal parameter ignored"), so that the code can still be compiled. Users that don't care about this particular warning can suppress it, and then happily add the extra keyword.