Subject: Re: Compilation / toolchain trouble
To: Ben Harris <bjh21@netbsd.org>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm
Date: 03/19/2002 15:18:16
> On Tue, 19 Mar 2002, Reinoud Zandijk wrote:
> 
> > i've been experiencing toolchain trouble now i crosscompile from
> > Alpha->Acorn32 ... in the compilation of the Acorn32 userland (i.e. not the
> > toolchain section for Alpha) it gives a
> >
> > dist/toolchain/gcc/rtl.h:110 : warning : width of `code' exceeds its type
> >
> > typedef struct rtx_def
> > {
> >   ......
> >   /* The kind of expression this is. */
> >   enum rtx_code code : 16;
> >   ......
> > }
> >
> > its within the #ifdef ONLY_INT_FIELD but it doesn't have the ``#ifdef
> > CODE_FIELD_BUG'' surrounding this one making like `unsigned int code: 16'
> > has that is declared above.
> >
> > What to do?
> 
> A simple (if rather rude) fix would be to work out where enum rtx_code is
> defined, and add an extra enumerator to it in order to stretch it out to
> 16 bits.

Tricky, since that enum comes via rtl.def, and the enum is defined by

#define DEF_RTL_EXPR(w,x,y,z) w

enum rtx_code
{
#include "rtl.def"
}

#undef DEF_RTL_EXPR
#define DEF_RTL_EXPR ...

Is the warning causing a build failure?

R.