ARM Technical Support Knowledge Articles


Applies to: C166 C Compiler


Information in this article applies to:


I receive the following warning message:

*** WARNING 189 IN LINE 5 OF .MAIN.C: 'xxx': storage class changed to 'static'

when I compile the following function:

void main (void)
int i;
int j;
int idata asdf;

i = 100;
j = 1000;
asdf = i + j;

that has a local variable stored in the idata area.

What does this mesn?


By default, the C166 compiler stores local variables in a stack frame on the user stack. When you override the storage area for a local variable, you make that function non-reentrant. (Since a new copy of the idata variable is not created for each entry into the function).

This warning message is intended to alert you to the fact that you have declared a static variable inside the function without using the static keyword.


If you want the function to still be reentrant, you must remove the storage area from the variable declaration. Or, you must move that variable declaration outside of the function.

Article last edited on: 2000-03-12 00:00:00

Rate this article

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