Subject: toolchain/22500: lint breakage for named initializers
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kristerw@netbsd.org>
List: netbsd-bugs
Date: 08/16/2003 00:18:03
>Number:         22500
>Category:       toolchain
>Synopsis:       lint breakage for named initializers
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 16 00:19:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Krister Walfridsson
>Release:        NetBSD-current as of 2003-08-15
>Organization:
	
>Environment:
	
	
System: NetBSD homeworld.netbsd.org 1.6.1 NetBSD 1.6.1 (HOMEWORLD) #2: Fri Jul 25 09:05:09 CDT 2003 root@aurora.ait.iastate.edu:/usr/NetBSD/kernels/compile/HOMEWORLD i386
Architecture: i386
Machine: i386
>Description:
It is not possible to lint an i386 GENERIC kernel, because lint barfs on
some usages of structure and union named initializers (for example in
dev/ic/icp_ioctl.c).

>How-To-Repeat:
# i386--netbsdelf-lint -S 1.c
1.c(9): undefined struct/union member: a [101]
# i386--netbsdelf-lint -S 2.c
2.c(9): lint error: /usr/local/tmp/nbsd030815/src/tools/lint1/../../usr.bin/xlint/lint1/init.c, 165: popi2()

for the files

--- /dev/null   Fri Aug 15 23:24:11 2003
+++ 1.c Sat Aug 16 02:12:50 2003
@@ -0,0 +1,9 @@
+struct {
+       union {
+               struct {
+                       int a1;
+                       int a2;
+               } a;
+               int b;
+       } c;
+} foo = {{.a = {0, 0}}};

--- /dev/null   Fri Aug 15 23:24:11 2003
+++ 2.c Sat Aug 16 01:54:24 2003
@@ -0,0 +1,9 @@
+struct {
+       union {
+               int a;
+               struct {
+                       int b1;
+                       int b2;
+               } b;
+       } c;
+} bar = {{.b = {0, 0}}};


>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted: