Subject: bin/20264: lint(1) has problems with named member initialization
To: None <gnats-bugs@gnats.netbsd.org>
From: None <M.Drochner@fz-juelich.de>
List: netbsd-bugs
Date: 02/09/2003 17:38:00
>Number:         20264
>Category:       bin
>Synopsis:       lint(1) has problems with named member initialization
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 09 08:39:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Matthias Drochner
>Release:        NetBSD 1.6N (most recent)
>Organization:
	KFA Juelich
>Environment:
System: NetBSD zelz26 1.6N NetBSD 1.6N (ZELZ26) #389: Fri Feb 7 23:32:15 MET 2003 drochner@zelz26:/home/drochner/netbsd/sys/arch/i386/compile/ZELZ26 i386
Architecture: i386
Machine: i386
>Description:
	Initializations like in sys/crypto/rijndael/boxes-fst.dat rev. 1.4
cause hard errors on a kernel "make lint".
(What triggers it seems the array within a union.)
>How-To-Repeat:
Here is a small test program:

union mist {
        char *p;
        int a[1];
};

union mist xx = {
        .a = { 7 }
};

Processing this with "lint -S" yields:
linttest.c(8): lint error: /usr/src/usr.bin/xlint/lint1/init.c, 165: popi2()

Replacing "union" by "struct" gives the same result.
>Fix:
	???
>Release-Note:
>Audit-Trail:
>Unformatted: