On Sun, 2021-06-13 at 11:29 +0100, Jonny Grant wrote: > If address 0x0 is allowed, would GCC ever change the optimization to > remove NULL checks? > How does this configuration effect the compiled machine code. > > On SH2A, we have the interrupt vector at address 0x0, with the first 4 > bytes the initial program counter address (in this ROM space) Use -fno-delete-null-pointer-checks for the source file containing code need to access address 0. -- Xi Ruoyao <xry111@xxxxxxxxxxxxxxxx> School of Aerospace Science and Technology, Xidian University