This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Will backend ever see an memory operand with address wrap around?


On Sun, May 13, 2012 at 10:24 PM,  <amylaar@spamcop.net> wrote:
> Quoting "H.J. Lu" <hjl.tools@gmail.com>:
>
>> What is the run-time result when overflow happens?
>
>
> Assuming you use a 32 bit unsigned base address, and the space beyond 4G
> is unmapped, you'll get a SEGV.

So, when used for load and store, "base + offset" with overflow/underflow
has unspecified behavior.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]