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:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 29 20:00:00 +0000 2008
>Last-Modified:  Tue Apr 29 21:15:03 +0000 2008
>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.

>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

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.