NetBSD Problem Report #38542

From martin@duskware.de  Tue Apr 29 19:55:10 2008
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 44F7D63B293
	for <gnats-bugs@gnats.netbsd.org>; Tue, 29 Apr 2008 19:55:10 +0000 (UTC)
Message-Id: <20080429195412.5DBCF63B293@narn.NetBSD.org>
Date: Tue, 29 Apr 2008 19:54:12 +0000 (UTC)
From: uwe@NetBSD.org
Reply-To: uwe@NetBSD.org
To: netbsd-bugs-owner@NetBSD.org
Subject: lint does not grok complex designated initiliazers
X-Send-Pr-Version: www-1.0

>Number:         38542
>Category:       toolchain
>Synopsis:       lint does not grok complex designated initiliazers
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 29 20:00:00 +0000 2008
>Closed-Date:    Mon Feb 07 03:46:59 +0000 2022
>Last-Modified:  Mon Feb 07 03:46:59 +0000 2022
>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.

>Release-Note:

>Audit-Trail:
From: "Valeriy E. Ushakov" <uwe@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: David Holland <dholland-bugs@netbsd.org>
Subject: Re: toolchain/38542: lint does not grok complex designated initiliazers
Date: Wed, 30 Apr 2008 01:10:44 +0400

 On Tue, Apr 29, 2008 at 20:25:22 +0000, David Holland wrote:

 > On Tue, Apr 29, 2008 at 08:00:00PM +0000, uwe@NetBSD.org wrote:
 >  > Lint complains about unexpected open bracket in complex designated
 >  > initializer in mathimpl.h, wrapped below for readability:
 > 
 > Also see 20264, 22500...

 The simple case in 20264 seems to be fixed now.

 The 3.c case reported in 22500 now gives

   lint1 in free(): warning: chunk is already free.

 with both native 4.0 lint and freshly build cross lint.

 -uwe

State-Changed-From-To: open->closed
State-Changed-By: rillig@NetBSD.org
State-Changed-When: Mon, 07 Feb 2022 03:46:59 +0000
State-Changed-Why:
Fixed for NetBSD 10 in init.c 1.179 from 2021-03-30, thanks for the PR.


>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.