ARM Technical Support Knowledge Articles

WARNING C258 (MSPACE ON PARAMETER IGNORED)

Applies to: CX51 C Compiler

Answer


Information in this article applies to:


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.

ATTACHED FILES

Request the files attached to this knowledgebase article.

Article last edited on: 2006-01-31 18:18:18

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential