#1340 Local static object placed at abs. addr. causes assem. error

closed-fixed
Maarten Brock
5
2013-05-25
2007-06-08
Patryk
No

Local static object placed at absolute address causes assembler error.
<o> .org in REL area or directive / mnemonic error
<q> missing or improper operators, terminators, or delimiters

loc[] is placed in .area CONST instead of .area CABS like glob[].

/*
SDCC version:
mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.7.0
#4818 (May 31 2007) (MINGW32)

command line:
sdcc.exe -c --debug --use-stdout -V --std-sdcc99 -I... Source4.c

verbose:
+ sdcpp.exe -nostdinc -Wall -std=c99 -I"..." -obj-ext=.rel
-DSDCC_MODEL_SMALL -DSDCC=270 -DSDCC_mcs51 -D__mcs51
-I"...\SDCC\bin\..\include\mcs51" -I"...\SDCC\bin\..\include"
"...\Source3.c"
+ asx8051.exe -plosgffc "Source4.asm"

Paths (local drives) are replaced with '...' above.
WXP HE PL SP2, AMD Athlon XP 1700+
*/

__code __at 0x7F00 const char glob[10] = { 0 };
void Foo(void)
{
static __code __at 0x7F20 const char loc[10] = { 0 }; // this line causes asm error
return;
}

Discussion

  • Patryk
    Patryk
    2007-06-08

    source file causing error

     
    Attachments
  • Maarten Brock
    Maarten Brock
    2007-06-09

    • assigned_to: nobody --> maartenbrock
     
  • Maarten Brock
    Maarten Brock
    2007-06-09

    Logged In: YES
    user_id=888171
    Originator: NO

    Fixed in SDCC 2.7.2 #4841

     
  • Maarten Brock
    Maarten Brock
    2007-06-09

    • labels: --> C-Front End
    • milestone: --> fixed
    • status: open --> closed-fixed