Current-Users archive

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

Re: compiler error by pcc



On 04/20/2012 02:17 PM, Iain Hibbert wrote:
On Fri, 20 Apr 2012, Toru Nishimura wrote:

Hi,

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

$ build.sh -V HAVE_PCC=yes -V USETOOLS_PCC=yes tools
$ build.sh 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.
I don't see why it shouldn't be, though this seems a context issue.. I
have filed a bug report upstream for that, see

    http://pcc.ludd.ltu.se/jira/browse/PCC-391
Fixed upstream now.

-- Ragge



Home | Main Index | Thread Index | Old Index