On Thu, 15 Nov 2007, Nicholas Clark via RT wrote:

> On Wed, Nov 14, 2007 at 02:49:33PM -0500, Andy Dougherty wrote:
> 
> >  130 cast increases required alignment of target type
> 
> That warning is unlikely to show up on anything x86 isn't it?

Right.  Most of them them are also harmless, though in the past there have 
been some such warnings that have been right on target.  Understanding 
them involves obtaining a deeper understanding of parrot's use of 
structures, pointers, and memory than I have ever achieved.

> >   65 dereferencing type-punned pointer will break strict-aliasing rules
> 
> Whilst I believe I know a lot about C, pointer aliasing rules are the big
> thing I still don't feel confident about. I've very rarely seen them
> covered.
> 
> Is there a good explanation anywhere online?

The gcc docs have some examples, but they are for much simpler cases, and 
still left me scratching my head when I tried to apply those lessons to 
parrot.  Another place that might be good to read is

        http://docs.sun.com/source/806-6145/alias_dis.html

I haven't looked at that one in any detail.

The last time I looked at this issue carefully (which was a while ago) I 
concluded that my understanding was incomplete and/or gcc's warnings 
weren't always accurate -- there were some cases where I would have 
expected a warning but didn't get one, and others where I would not have 
expected a warning but did get one.

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to