The below code fails when compiling for 6502:
sdcc -mmos6502 ./struct_bits.c
./struct_bits.c:11: warning 283: function declarator with no prototype
./struct_bits.c:14: warning 84: 'auto' variable 'voicePtr' may be used before initialization
struct_bits.asm:84: Error: <o> .org in REL area or directive / mnemonic error
removing struct_bits.rel
/// GPL 2.0 or later
#include <stdint.h>
typedef struct VoiceData {
uint8_t index : 8;
uint8_t size;
} VoiceData;
void SoundVoiceSet2( ) {
VoiceData *voicePtr;
voicePtr->index = voicePtr->size - 1;
}
The asm file contains:
...
sta *(__DPTR+1)
ERROR Unimplemented genPackBits
; ./struct_bits.c: 18: }
sdcc -v
SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/sm83/tlcs90/ez80_z80/z80n/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15/mos6502 4.2.9 #13727 (Linux)
should be fixed in [r14501]
Related
Commit: [r14501]
Last edit: Gabriele Gorla 2023-12-04
Why is this pending-fixed and not closed-fixed?