• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Odd GCC Behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Odd GCC Behavior


  • Subject: Re: Odd GCC Behavior
  • From: "Clark Cox" <email@hidden>
  • Date: Mon, 30 Jun 2008 09:26:50 -0700

On Mon, Jun 30, 2008 at 6:38 AM, J. Aaron Pendergrass
<email@hidden> wrote:
> I'm aware that this is undefined.
> I did explicitly say that the C spec leaves this unspecified.
> But {1,2,7,4} seems like such an odd choice.  Especially when looking at the
> disassembly:
>
>        lwz      r2,56(r30)
>        addi    r2,r2,-8
>        lwz      r9,0(r2)
>        lwz      r2,56(r30)
>        addi    r0,r2,-4
>        stw      r0,56(r30)
>        lwz      r2,56(r30)
>        lwz      r0,0(r2)
>        add     r0,r9,r0
>        lwz      r2,56(r30)
>        addi    r2,r2,-8
>        stw      r0,0(r2)
>
> which really seems to be going out of its way to implement a fairly
> unintuitive semantics
> for this piece of undefined behavior and I was curious what the motivation
> behind this behavior might be.

With undefined behavior, there is no such thing as an "odd choice".
There is no choice to be made.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Odd GCC Behavior
      • From: "J. Aaron Pendergrass" <email@hidden>
References: 
 >Odd GCC Behavior (From: "J. Aaron Pendergrass" <email@hidden>)
 >Re: Odd GCC Behavior (From: Jim Jagielski <email@hidden>)
 >Re: Odd GCC Behavior (From: "J. Aaron Pendergrass" <email@hidden>)

  • Prev by Date: Re: Odd GCC Behavior
  • Next by Date: Re: Odd GCC Behavior
  • Previous by thread: Re: Odd GCC Behavior
  • Next by thread: Re: Odd GCC Behavior
  • Index(es):
    • Date
    • Thread