Apparently, I can't initialize a pointer to the beginning of an array:

wheelT* wheelSelected = wheelA;

will initialize 'wheelSelected' to a wrong value, to make the code work propely, I have to initialize the pointer through a wheelInit() function that i call from the startup code:


typedef struct wheelS {
    char    Name[5];
    short    Diameter;    // diameter, in millimeters
} wheelT;

wheelT wheelA[5] = {
    {"W1 C", 123},
    {"W2QF",  40},
    {"W3.P", 444},
    {"W4-D",  33},
    {"W5/@", 500},

wheelT* wheelSelected;

void wheelInit()
wheelSelected = wheelA;


My sdcc is

SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.7.2 #4862 (Jun 27 2007) (UNIX)

and I compile with:   -mpic16 -p18f4550 --mplab-comp

Any clue of what I'm doing wrong?
Thanks! =)