ARM Technical Support Knowledge Articles

WARNING 258 (MSPACE ILLEGAL ON STRUCT/UNION MEMBER)

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

While compiling my C source file, the 8051 compiler reports the following diagnostic:

WARNING 258: MSPACE ILLEGAL ON STRUCT/UNION MEMBER
MSPACE ON PARAMETER IGNORED

ANSWER

A member of a structure/union or a parameter may not contain the specification of a memory type. The object to which the pointer refers may, however, contain a memory type. For example:

struct vp {char code c; int xdata i; };

generates warning 258.

struct v1 {char c ; int xdata *i; };

is the correct declaration for the struct.

MORE INFORMATION

Article last edited on: 2005-07-15 12:38:00

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