ARM Technical Support Knowledge Articles

ERROR 274 (ABSOLUTE SPECIFIER ILLEGAL)

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

I have created an absolute variable declaration inside my main C function.

void main (void)
{
data char reserve _at_ 0x0D;
.
.
.

When I compile this, however, I get the following error message:

*** ERROR C274 IN LINE 24 OF HELLO.C:
    'reserve': absolute specifier illegal

What's wrong?

ANSWER

Absolute variables must be global and may not be declared inside a function. Move the variable declaration outside the main function and the declaration will compile correctly.

Article last edited on: 2002-07-12 00:00: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