NetBSD-Bugs archive

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

toolchain/38542: lint does not grok complex designated initiliazers



>Number:         38542
>Category:       toolchain
>Synopsis:       lint does not grok complex designated initiliazers
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 29 20:00:00 +0000 2008
>Originator:     Valery Ushakov
>Release:        current as ot 2008-04-29
>Organization:
>Environment:
>Description:
Now that libm/Makefile enabled lint (in revision 1.83)
VAX build fails in libm.

Lint complains about unexpected open bracket in complex designated
initializer in mathimpl.h, wrapped below for readability:

const union { long l[2]; double d; } cat3(__,name,x) = {
   .l[0] = cat3t(0x,x1,x2),
   .l[1] = cat3t(0x,x3,x4)
};

.memeber[index] syntax confuses lint.

>How-To-Repeat:
Try building current for VAX.

>Fix:
One possible workaround would be to simplify the initializer to

  { .l = { [0] = ..., [1] = ... } };

but unfortunately that triggers another bug (lint dumps core)
that I will file separately.



Home | Main Index | Thread Index | Old Index