Hi All.
Next up in my quest to compile my TinyOS port to 8051* is a problem with
inline. The code is generated by the precompiler nesC and introduces a
very high number of superfluous function calls to be inlined by the
compiler. I've attached a cutout from a larger program that fails with
the following error:

sdcc -mmcs51 --std-sdcc99 test_inline.c 
-:0: error 20: Undefined identifier '__00010001'
at 28: error 20: Undefined identifier 'result'

* Again, check out the following if you are interested:
 http://www.tinyos8051wg.net


-- 
Regards Martin Leopold.
Dept. of Computer Science, University of Copenhagen
http://www.diku.dk/~leopold


typedef unsigned char uint8_t;

typedef uint8_t error_t  ;

enum __nesc_unnamed4247 {
  SUCCESS = 0, 
  FAIL = 1, 
  ESIZE = 2, 
  ECANCEL = 3, 
  EOFF = 4, 
  EBUSY = 5, 
  EINVAL = 6, 
  ERETRY = 7, 
  ERESERVE = 8, 
  EALREADY = 9
};

static inline   error_t PlatformP__LedsInit__default__init(void) {
  return SUCCESS;
}

static  error_t PlatformP__LedsInit__init(void);
static inline  error_t PlatformP__LedsInit__init(void){
  unsigned char result;

  result = PlatformP__LedsInit__default__init();

  return result;
}

int main(void) {
  PlatformP__LedsInit__init();
   
   return 0;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to