When a bitfield initialiser is greater than the maximum allowed value for a given number of bits the compiler gives "warning 158: overflow in implicit constant conversion", and the generated initialiser code restricts the value into the allocated bits.
It is OK so far.
On the other hand when the initialised structure with bit fields is not in the data, but in the code memory the value overflows into the next bit field and no warning is given.
I would expect the same behaviour in both cases, regardless of the memory space the compiler should give a warning and restrict the initialiser into the allocated bits.
The attached program illustrates both cases: initialised structure in data and code memory.
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.7.4 #4
972 (Nov 24 2007) (MINGW32)
Microsoft Windows XP [Version 5.1.2600]