NetBSD Problem Report #20264

Received: (qmail 6861 invoked by uid 605); 9 Feb 2003 16:38:02 -0000
Message-Id: <200302091638.RAA0000113611@zel459.zel.kfa-juelich.de>
Date: Sun, 9 Feb 2003 17:38:00 +0100 (MET)
From: M.Drochner@fz-juelich.de
Sender: gnats-bugs-owner@netbsd.org
Reply-To: M.Drochner@fz-juelich.de
To: gnats-bugs@gnats.netbsd.org
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)
>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:
State-Changed-From-To: open->closed
State-Changed-By: rillig@NetBSD.org
State-Changed-When: Sun, 28 Feb 2021 20:19:43 +0000
State-Changed-Why:
Has been fixed somewhere in 2006.
Added a test to prevent this from breaking again.
Thanks for the PR.


From: "Roland Illig" <rillig@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
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 t_integration.sh
 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/t_integration.sh

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

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