NetBSD Problem Report #20264

Received: (qmail 6861 invoked by uid 605); 9 Feb 2003 16:38:02 -0000
Message-Id: <>
Date: Sun, 9 Feb 2003 17:38:00 +0100 (MET)
Subject: lint(1) has problems with named member initialization
X-Send-Pr-Version: 3.95

>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:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 09 16:39:00 +0000 2003
>Closed-Date:    Sun Feb 28 20:19:43 +0000 2021
>Last-Modified:  Sun Feb 28 20:20:02 +0000 2021
>Originator:     Matthias Drochner
>Release:        NetBSD 1.6N (most recent)
	KFA Juelich
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
	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.)
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.
State-Changed-From-To: open->closed
State-Changed-When: Sun, 28 Feb 2021 20:19:43 +0000
Has been fixed somewhere in 2006.
Added a test to prevent this from breaking again.
Thanks for the PR.

From: "Roland Illig" <>
Subject: PR/20264 CVS commit: src
Date: Sun, 28 Feb 2021 20:17:14 +0000

 Module Name:	src
 Committed By:	rillig
 Date:		Sun Feb 28 20:17:14 UTC 2021

 Modified Files:
 	src/distrib/sets/lists/tests: mi
 	src/tests/usr.bin/xlint/lint1: Makefile
 Added Files:
 	src/tests/usr.bin/xlint/lint1: d_c99_union_init5.c

 Log Message:
 lint: add test to demonstrate that PR bin/20264 has been fixed

 To generate a diff of this commit:
 cvs rdiff -u -r1.1022 -r1.1023 src/distrib/sets/lists/tests/mi
 cvs rdiff -u -r1.32 -r1.33 src/tests/usr.bin/xlint/lint1/Makefile
 cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/d_c99_union_init5.c
 cvs rdiff -u -r1.30 -r1.31 src/tests/usr.bin/xlint/lint1/

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.