??? 05/26/10 16:15 Read: times |
#176194 - I ma stuck on the next one Responding to: ???'s previous message |
I stole an array from a Keil build where it (without the 'comment outs') built without problems, with SDCC I get "warning 147 excess elements in arreay of chars initializer after 'GCCAlanbas'.
To attempt to find out I started selective comment outs (see below for the results) the definitions: #define LRB_START_LGTH 4 // WD4- #define LRB_ID_LGTH 2 // 1= #define LRB_ST_LGTH 4 // OK /WET /ALRM #define LRB_SP_LGTH 1 // - #define LRB_TM_LGTH 3 // # cr lf the struct: // LAN record structured to make changes easy typedef struct { U8 LRBstart[LRB_START_LGTH] ; // preamble U8 LRBid1[LRB_ID_LGTH] ; // identifier U8 LRBst1[LRB_ST_LGTH] ; // status U8 LRBsp1[LRB_SP_LGTH] ; // separator U8 LRBid2[LRB_ID_LGTH] ; // identifier U8 LRBst2[LRB_ST_LGTH] ; // status U8 LRBsp2[LRB_SP_LGTH] ; // separator U8 LRBid3[LRB_ID_LGTH] ; // identifier U8 LRBst3[LRB_ST_LGTH] ; // status U8 LRBsp3[LRB_SP_LGTH] ; // separator U8 LRBid4[LRB_ID_LGTH] ; // identifier U8 LRBst4[LRB_ST_LGTH] ; // status U8 LRBterm[LRB_TM_LGTH] ; // terminator } STR_LAN_REC_BAS; for this use I have added lengths in the comments to make check easy __code STR_LAN_REC_BAS GCCSlanbas = { // { "WD4-" }, // LRBstart[LRB_START_LGTH] ; 4 // preamble PLACE 1 // { "1=" }, // LRBid1[LRB_ID_LGTH] ; 2 // identifier // { "OK " }, // LRBst1[LRB_ST_LGTH] ; 4 // status // { "-" }, // LRBsp1[LRB_SP_LGTH] ; 1 // separator // { "2=" }, // LRBid2[LRB_ID_LGTH] ; 2 // identifier // { "OK " }, // LRBst2[LRB_ST_LGTH] ; 4 // status // { "-" }, // LRBsp2[LRB_SP_LGTH] ; 1 // separator // // { "3=" }, // LRBid3[LRB_ID_LGTH] ; 2 // identifier // { "OK " }, // LRBst3[LRB_ST_LGTH] ; 4 // status // { "-" }, // LRBsp3[LRB_SP_LGTH] ; 1 // separator // // { "4=" }, // LRBid4[LRB_ID_LGTH] ; 2 // identifier // { "OK " }, // LRBst4[LRB_ST_LGTH] ; 4 // status // // { '#', 0x0d, 0x0a} // LRBterm[LRB_TM_LGTH] ; 3 // terminator PLACE 2 // {0} PLACE 3 }; the result of the 'comment outs': uncommenting 3: no error uncommenting 2: no error uncommenting 1 + 3: error any help will be greatly appreciated Erik |