Warning C258 in Keil C51 V7.02b

After upgrading to 7.02b, I get a C258 Warning when using the typedef in the following example.

If I use 'bit' directly, the Warning is not issued.

Any clues?

Best regards and thanks in advance.

Jose


volatile unsigned char c1, c2, c3;

typedef bit BOOL;

unsigned char func1(BOOL a, unsigned char b)
{
  if (a) return b;
  else return ~b;
}

void main(void)
{
  c1 = func1(0, 9);
  c2 = func1(1, 8);
}

Parents
  • typedef bit BOOL;
    Yes, that'd be really useful, wouldn't it!
    But, unfortunately, Keil doesn't quite seem to work that way. :-(

    It seems that the bit keyword is not so much a new type - in addition to char, int, etc - introduced by C51, but another of the memory-space qualifiers like idata, xdata, etc
    Hence the warning relating to m-space

    I don't think the distinction is made particularly clear in the manual. :-(

Reply
  • typedef bit BOOL;
    Yes, that'd be really useful, wouldn't it!
    But, unfortunately, Keil doesn't quite seem to work that way. :-(

    It seems that the bit keyword is not so much a new type - in addition to char, int, etc - introduced by C51, but another of the memory-space qualifiers like idata, xdata, etc
    Hence the warning relating to m-space

    I don't think the distinction is made particularly clear in the manual. :-(

Children
More questions in this forum