Keil Logo

CX51: WARNING C258 (MSPACE ON PARAMETER IGNORED)


Information in this article applies to:

  • CX51 Version 7.01

QUESTION

I'm working with Philips MX and my code generates the following warning when using a typedef:

MAIN.C(5): warning C258: 'a': mspace on parameter ignored

No warning is generated when using #define.

typedef bit bool;
//#define bool bit    // defines doesn't generate the warning

bool test ( bool a )
{
return (!a);
}

void main ( void )
{
bool ida,retorno;

retorno = test ( ida );
while (1);
}

The output from this build is as follows:

Build target 'Target 1'
compiling main.c...
MAIN.C(5): warning C258: 'a': mspace on parameter ignored
linking...
Program Size: data=9.3 xdata=0 const=0 code=30
creating hex file from "test"...
"test" - 0 Error(s), 1 Warning(s).

Why is the compiler generating this warning only for typedef? Am I missing something?

ANSWER

This is a problem detected under C51 V7.01. It is solved in the latest update. You may download the latest updates from the Keil Website.

Last Reviewed: Tuesday, January 31, 2006


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.