Re: GCC optimization re-order statements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux