Re: [PATCH] Use a zero-size array in the struct devres

2007-03-06 Thread Catalin Marinas
Tejun Heo <[EMAIL PROTECTED]> wrote: > Catalin Marinas wrote: >> It sounds to me like the alignment of an incomplete type is not >> guaranteed (as you can't even enquire about it, though I might be >> wrong). This is probably dependent on the compiler as well - with >> gcc-3.3 on x86,

Re: [PATCH] Use a zero-size array in the struct devres

2007-03-06 Thread Tejun Heo
Catalin Marinas wrote: > Chapter 5.31 (http://gcc.gnu.org/onlinedocs/gcc/Alignment.html) states > that "it is an error to ask for the alignment of an incomplete type" > and flexible array members have incomplete type (according to ISO C99 > as described in

Re: [PATCH] Use a zero-size array in the struct devres

2007-03-06 Thread Catalin Marinas
Tejun, Tejun Heo <[EMAIL PROTECTED]> wrote: > Catalin Marinas wrote: >> Commit 9ac7849e35f705830f7b016ff272b0ff1f7ff759 adds the devres >> structure containing a flexible unsigned long long array, with a >> comment about the guaranteed alignment. According to the gcc manual, >> flexible arrays

Re: [PATCH] Use a zero-size array in the struct devres

2007-03-06 Thread Tejun Heo
Hello, Catalin. Catalin Marinas wrote: > Commit 9ac7849e35f705830f7b016ff272b0ff1f7ff759 adds the devres > structure containing a flexible unsigned long long array, with a > comment about the guaranteed alignment. According to the gcc manual, > flexible arrays are considered incomplete types and

[PATCH] Use a zero-size array in the struct devres

2007-03-06 Thread Catalin Marinas
Commit 9ac7849e35f705830f7b016ff272b0ff1f7ff759 adds the devres structure containing a flexible unsigned long long array, with a comment about the guaranteed alignment. According to the gcc manual, flexible arrays are considered incomplete types and it is an error to ask for their alignment. This

[PATCH] Use a zero-size array in the struct devres

2007-03-06 Thread Catalin Marinas
Commit 9ac7849e35f705830f7b016ff272b0ff1f7ff759 adds the devres structure containing a flexible unsigned long long array, with a comment about the guaranteed alignment. According to the gcc manual, flexible arrays are considered incomplete types and it is an error to ask for their alignment. This

Re: [PATCH] Use a zero-size array in the struct devres

2007-03-06 Thread Tejun Heo
Hello, Catalin. Catalin Marinas wrote: Commit 9ac7849e35f705830f7b016ff272b0ff1f7ff759 adds the devres structure containing a flexible unsigned long long array, with a comment about the guaranteed alignment. According to the gcc manual, flexible arrays are considered incomplete types and it

Re: [PATCH] Use a zero-size array in the struct devres

2007-03-06 Thread Catalin Marinas
Tejun, Tejun Heo [EMAIL PROTECTED] wrote: Catalin Marinas wrote: Commit 9ac7849e35f705830f7b016ff272b0ff1f7ff759 adds the devres structure containing a flexible unsigned long long array, with a comment about the guaranteed alignment. According to the gcc manual, flexible arrays are

Re: [PATCH] Use a zero-size array in the struct devres

2007-03-06 Thread Tejun Heo
Catalin Marinas wrote: Chapter 5.31 (http://gcc.gnu.org/onlinedocs/gcc/Alignment.html) states that it is an error to ask for the alignment of an incomplete type and flexible array members have incomplete type (according to ISO C99 as described in

Re: [PATCH] Use a zero-size array in the struct devres

2007-03-06 Thread Catalin Marinas
Tejun Heo [EMAIL PROTECTED] wrote: Catalin Marinas wrote: It sounds to me like the alignment of an incomplete type is not guaranteed (as you can't even enquire about it, though I might be wrong). This is probably dependent on the compiler as well - with gcc-3.3 on x86, __alignof__(unsigned