[plt-dev] Re: [plt] Push #20286: master branch updated

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Sat May 22 20:39:06 EDT 2010

On Sat, May 22, 2010 at 6:03 PM, Eli Barzilay <eli at barzilay.org> wrote:
> On May 22, Matthew Flatt wrote:
>> At Sat, 22 May 2010 06:47:44 -0400, Eli Barzilay wrote:
>> > On May 21, jay at racket-lang.org wrote:
>> > >
>> > > src/racket/gc/new_hblk.c
>> > > ~~~~~~~~~~~~~~~~~~~~~~~~
>> > > --- OLD/src/racket/gc/new_hblk.c
>> > > +++ NEW/src/racket/gc/new_hblk.c
>> > > @@ -164,7 +164,8 @@ ptr_t GC_build_fl(struct hblk *h, size_t sz, GC_bool
>> > clear, ptr_t list)
>> > >     * put p (which is now head of list of objects in *h) as first
>> > >     * pointer in the appropriate free list for this size.
>> > >     */
>> > > -      obj_link(h -> hb_body) = list;
>> > > +   word *tmp = (word *)h->hb_body;
>> > > +      obj_link(tmp) = list;
>> > >        return ((ptr_t)p);
>> > >  }
>> >
>> > It's not clear to me what this is trying to do, but this breaks on
>> > windows.
>>
>> The problem is the variable declaration in the middle of a
>> block. I'll fix it.
>
> (Yeah, that was clear -- but why is it needed in the first place?  The
> only place I've seen this was due to xform limitations.)

If "it" = this patch, then it removes this error:

.../src/racket/gc/new_hblk.c:167: warning: dereferencing type-punned
pointer will break strict-aliasing rules

-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

"The glory of God is Intelligence" - D&C 93


Posted on the dev mailing list.