Re: Memory alignment for arrays in GCC for ARM

2024-11-04 Thread Richard Earnshaw (lists) via Gcc
On 02/11/2024 00:55, Oren Zvi via Gcc wrote: > Hi, > > Was wondering about a curious thing that the compiler does. > For the code > > static void createX() > { > static char ; > static uint8_t y; > > printf("%c %c\r\n", y, ); > } > > I am getting the following lines in the m

Memory alignment for arrays in GCC for ARM

2024-11-01 Thread Oren Zvi via Gcc
Hi, Was wondering about a curious thing that the compiler does. For the code static void createX() { static char ; static uint8_t y; printf("%c %c\r\n", y, ); } I am getting the following lines in the memory map: .bss._ZZL7createXvE4 0x200024c00