Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: For C Experts

2006-03-31 by dsidlauskas1

Paul,

You're not the first one to say I was nuts :-).

However, it might help with my recovery if you coulld elaborate a bit.

Thanks,

Dave S.

--- In lpc2000@yahoogroups.com, "Paul Curtis" <plc@...> wrote:
>
> Hi, 
> 
> > Since the compiler knows that buf is a byte aligned object, 
> > woutldn't it be resonable for the compiler to treat
> > 
> > (int *)&buf[i]
> > 
> > as 
> > 
> > (__packed int *)&buf[i]
> > 
> > In general, if non-naturaly aligned objects are promoted by a 
> > cast, shouldn't, by default, the cast be of the proper 
> > non-aligned type?
> 
> Bloody hell no.  Insanity.
> 
> --
> Paul Curtis, Rowley Associates Ltd   http://www.rowley.co.uk 
> CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.