[openib-general] Re: at won't compile with gcc-2.95

Hal Rosenstock halr at voltaire.com
Thu Sep 1 10:21:12 PDT 2005


On Thu, 2005-09-01 at 12:47, Roland Dreier wrote:
> Not sure how much it matters, given that it seems all this will need
> to be rewritten before going upstream, but at doesn't compile with gcc-2.95:
> 
>   CC [M]  drivers/infiniband/core/at.o
> In file included from /data/home/roland/Src/linux-2.6.13/drivers/infiniband/core/at.c:57:
> /data/home/roland/Src/linux-2.6.13/drivers/infiniband/core/at_priv.h:142: badly punctuated parameter list in `#define'
> In file included from /data/home/roland/Src/linux-2.6.13/drivers/infiniband/core/at.c:57:
> /data/home/roland/Src/linux-2.6.13/drivers/infiniband/core/at_priv.h:71: field `offset_words' already initialized
> /data/home/roland/Src/linux-2.6.13/drivers/infiniband/core/at_priv.h:72: field `offset_bits' already initialized
> /data/home/roland/Src/linux-2.6.13/drivers/infiniband/core/at_priv.h:72: duplicate initializer
> /data/home/roland/Src/linux-2.6.13/drivers/infiniband/core/at_priv.h:72: (near initialization for `ats_rec_table[2].field_name')
> /data/home/roland/Src/linux-2.6.13/drivers/infiniband/core/at_priv.h:73: field `size_bits' already initialized
> /data/home/roland/Src/linux-2.6.13/drivers/infiniband/core/at_priv.h:73: warning: excess elements in struct initializer
> /data/home/roland/Src/linux-2.6.13/drivers/infiniband/core/at_priv.h:73: warning: (near initialization for `ats_rec_table[2]')
> /data/home/roland/Src/linux-2.6.13/drivers/infiniband/core/at.c: In function `ats_op_complete':
> /data/home/roland/Src/linux-2.6.13/drivers/infiniband/core/at.c:134: warning: implicit declaration of function `WARN'
> make[4]: *** [drivers/infiniband/core/at.o] Error 1
> make[3]: *** [drivers/infiniband/core] Error 2
> make[2]: *** [drivers/infiniband] Error 2
> make[1]: *** [drivers] Error 2
> make: *** [_all] Error 2

I see the cause of the duplicate initializer and have just checked in a
fix for this.

Not sure yet on what gcc 2.95 doesn't like about:
#define WARN(fmt, arg ...)      printk("ib_at: %s: " fmt "\n", __FUNCTION__,  ## arg);
but that is the cause of the other compile issue in at.c.

-- Hal




More information about the general mailing list