Yahoo Groups archive

Lpc2000

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

Message

Re: For C Experts

2006-03-30 by dsidlauskas1

Ed, 

Yes, __packed works, but I'm porting a bunch of old 8 bit code that
doesn't have this sort of problems and its hard to find all of the
places where its needed.

Thanks,

Dave S.

--- In lpc2000@yahoogroups.com, "Ed Koffeman" <koffeman@...> wrote:
>
> 
> 
> 
> If your compiler has the __packed keyword then you could use:
> 
> __packed int *ip;
> 
> ...
> 
>     ip = (__packed int *)&buf[i];
> 
> and the compiler should know to treat the alignment carefully.
> 
> But, it's inefficient.
> 
> Ed Koffeman
>

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.