i have written this code and expected the code to fail but it does not.
typedef unsigned char UINT8_T;
#define INDEX 100
#define NULL (void *)0
#pragma DATA_SEG __RPAGE_SEG PAGED_RAM
#pragma DATA_SEG DEFAULT
ptr_data = buffer;
for(fl_index_u8=0; fl_index_u8 < 100; fl_index_u8++)
buffer[fl_index_u8] = fl_index_u8;
test_data[fl_index_u8] = *ptr_data;
It compiled but with warning : C1860: pointer conversion: possible loss of data
I expected that test_data will be filled with default values of 0, but it is filling with data loaded into buffer variable. I am doing the full chip simulation, the address loaded into ptr_data = 0x00 and it is 2 bytes yet the progam is running successfully?
From the map file
ptr_data 2108 2 2 1 .bss
buffer FD1000 64 100 3 PAGED_RAM
test_data 210C 64 100 1 .common
What is the common area?
Thanks and regards