> Is the kernel using this sort of non-integer-constant-expression in
> bit-field widths as well? Sizes of file-scope arrays (OK, a special case
> for that was added for WINE)? Null pointer constants (that's much more
> problematic to add special cases for)? __builtin_choose_expr conditions?
> I
On Sat, 25 Apr 2009, Denis Onischenko wrote:
> Thanks for the patch.
>
> There are another error while building linux kernel with GCC 4.5.0
> revision 146771.
>
> The minimal code for reproducing the error looks like:
>
> extern unsigned int __invalid_size_argument;
> #define TYPECHECK(t)(
Thanks for the patch.
There are another error while building linux kernel with GCC 4.5.0
revision 146771.
The minimal code for reproducing the error looks like:
extern unsigned int __invalid_size_argument;
#define TYPECHECK(t)( sizeof(t) == sizeof(t[1]) ? sizeof(t) :
__invalid_size_argument
Joe Buck writes:
> The compiler is not supposed to be pedantic by default. A standards
> document saying that a diagnostic is required should not be the end
> of the story, especially when we're talking about important, widely
> used code bases.
Sure, but at least your example code seems pretty
On Thu, Apr 23, 2009 at 5:39 PM, Joe Buck wrote:
>
> On Thu, Apr 23, 2009 at 1:38 PM, Denis Onischenko
>> wrote:
>> > The minimal code example is following:
>> >
>> >
>> > extern unsigned int __invalid_size_argument;
>> > #define TYPECHECK(t) ( sizeof(t) == sizeof(t[1]) ? sizeof(t) :
>> > __i
On Thu, Apr 23, 2009 at 1:38 PM, Denis Onischenko
> wrote:
> > The minimal code example is following:
> >
> >
> > extern unsigned int __invalid_size_argument;
> > #define TYPECHECK(t)( sizeof(t) == sizeof(t[1]) ? sizeof(t) :
> > __invalid_size_argument )
> >
> > static int arr[] = {
> >
On Thu, Apr 23, 2009 at 1:38 PM, Denis Onischenko
wrote:
> The minimal code example is following:
>
>
> extern unsigned int __invalid_size_argument;
> #define TYPECHECK(t) ( sizeof(t) == sizeof(t[1]) ? sizeof(t) :
> __invalid_size_argument )
>
> static int arr[] = {
> [TYPECHECK(int)] =
The minimal code example is following:
extern unsigned int __invalid_size_argument;
#define TYPECHECK(t)( sizeof(t) == sizeof(t[1]) ? sizeof(t) :
__invalid_size_argument )
static int arr[] = {
[TYPECHECK(int)] = 0,
};
int main()
{
return 0;
}
command line is: gcc test.c
GCC 4.
On Thu, 23 Apr 2009, Denis Onischenko wrote:
> Thanks for reply!
>
> DRM_IOCTL_NR is defined as
>
> #define _IOC_NRBITS 8
>
> #define _IOC_NRSHIFT 0
> #define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
>
> #define _IOC_NR(nr)(((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
>
> #define DRV_IOCTL_NR(n)
Thanks for reply!
DRM_IOCTL_NR is defined as
#define _IOC_NRBITS 8
#define _IOC_NRSHIFT 0
#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
#define _IOC_NR(nr)(((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
#define DRV_IOCTL_NR(n)_IOC_NR(n)
i.e. expands to an integer constant expressi
On Thu, 23 Apr 2009, Denis Onischenko wrote:
> The following errors appears when I tried to compile linux kernel
> 2.6.30-rc2 with GCC 4.5:
>
>
> linux-2.6/drivers/gpu/drm/drm_drv.c:59: error: nonconstant array index
> in initializer
> linux-2.6/drivers/gpu/drm/drm_drv.c:59: error: (near initial
The following errors appears when I tried to compile linux kernel
2.6.30-rc2 with GCC 4.5:
linux-2.6/drivers/gpu/drm/drm_drv.c:59: error: nonconstant array index
in initializer
linux-2.6/drivers/gpu/drm/drm_drv.c:59: error: (near initialization
for 'drm_ioctls')
...
compiled code looks like this
12 matches
Mail list logo