Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

compiler error by pcc


I have just tried to build NetBSD 6.0_BETA i386 kernel with pcc and
found the compiler fails at a certain line.

$ -V HAVE_PCC=yes -V USETOOLS_PCC=yes tools
$ kernel=GENERIC
   sys/dev/usb/uslsareg.h, line 170: array size not constant

The offending line in "sys/dev/usb/uslsa.c" is;

   CTASSERT(offsetof(struct slsa_cpr, uniProvName[0]) == 60);
At a glance the code seems ok. Changing it to (more natural) form solved
pcc compile error.

   CTASSERT(offsetof(struct slsa_cpr, uniProvName) == 60);

It's a variable length array.  Not sure the original line is legal or not.

Toru Nishimura / ALKYL Technology

Home | Main Index | Thread Index | Old Index