Hi!
> > > hm. So if I have
> > >
> > > struct bar {
> > > unsigned long b;
> > > } __attribute__((packed));
> > >
> > > struct foo {
> > > unsigned long u;
> > > struct bar b;
> > > };
> > >
> > > then the compiler can see that foo.b.b is well-aligned, reg
On Thu, Feb 15, 2007 at 05:27:20PM -0800, Andrew Morton wrote:
> No, icc surely supports attribute(packed). My point is that we shouldn't
> rely upon the gcc info file for this, because other compilers can (or
> could) be used to build the kernel.
>
> So it would be safer if the C spec said (or
On Fri, 16 Feb 2007 00:43:17 +
Ralf Baechle <[EMAIL PROTECTED]> wrote:
> On Thu, Feb 15, 2007 at 03:38:23PM -0800, Andrew Morton wrote:
>
> > hm. So if I have
> >
> > struct bar {
> > unsigned long b;
> > } __attribute__((packed));
> >
> > struct foo {
> >
On Thu, Feb 15, 2007 at 03:38:23PM -0800, Andrew Morton wrote:
> hm. So if I have
>
> struct bar {
> unsigned long b;
> } __attribute__((packed));
>
> struct foo {
> unsigned long u;
> struct bar b;
> };
>
> then the compiler ca
Andrew Morton wrote:
> hm. So if I have
>
> struct bar {
> unsigned long b;
> } __attribute__((packed));
>
> struct foo {
> unsigned long u;
> struct bar b;
> };
>
> then the compiler can see that foo.b.b is well-aligned, regardless
On Thu, 15 Feb 2007 22:18:39 +
Ralf Baechle <[EMAIL PROTECTED]> wrote:
> On Thu, Feb 15, 2007 at 01:53:58PM -0800, Andrew Morton wrote:
>
> > > The whole union thing was only needed to get rid of a warning but Marcel's
> > > solution does the same thing by attaching the packed keyword to the
Ralf Baechle wrote:
> Gcc info page says:
>
> [...]
> `packed'
> The `packed' attribute specifies that a variable or structure field
> should have the smallest possible alignment--one byte for a
> variable, and one bit for a field, unless you specify a larger
> value with the `a
On Thu, Feb 15, 2007 at 01:53:58PM -0800, Andrew Morton wrote:
> > The whole union thing was only needed to get rid of a warning but Marcel's
> > solution does the same thing by attaching the packed keyword to the entire
> > structure instead, so this patch is now using his macros but using __pack
On Thu, 15 Feb 2007 14:34:41 +
Ralf Baechle <[EMAIL PROTECTED]> wrote:
> On Wed, Feb 14, 2007 at 08:39:03PM -0800, Andrew Morton wrote:
>
> > Can someone please tell us how this magic works? (And it does appear to
> > work).
> >
> > It seems to assuming that the compiler will assume that me
On Wed, Feb 14, 2007 at 08:39:03PM -0800, Andrew Morton wrote:
> Can someone please tell us how this magic works? (And it does appear to
> work).
>
> It seems to assuming that the compiler will assume that members of packed
> structures can have arbitrary alignment, even if that alignment is obv
Hi Andrew,
> > +#define get_unaligned(ptr) \
> > +({ \
> > + const struct { \
> > + union {
On Wed, 14 Feb 2007 21:42:26 + Ralf Baechle <[EMAIL PROTECTED]> wrote:
> Time for a little bit of dead horse flogging.
>
> On Mon, Mar 06, 2006 at 05:05:52PM -0800, Andrew Morton wrote:
>
> > > --- a/include/asm-generic/unaligned.h
> > > +++ b/include/asm-generic/unaligned.h
> > > @@ -78,7 +
12 matches
Mail list logo