NetBSD Problem Report #43200
From www@NetBSD.org Fri Apr 23 16:40:48 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 9DCB963B8BC
for <gnats-bugs@gnats.NetBSD.org>; Fri, 23 Apr 2010 16:40:48 +0000 (UTC)
Message-Id: <20100423164048.6ED5963B873@www.NetBSD.org>
Date: Fri, 23 Apr 2010 16:40:48 +0000 (UTC)
From: henning.petersen@t-online.de
Reply-To: henning.petersen@t-online.de
To: gnats-bugs@NetBSD.org
Subject: Remove trailing comma in rump.h.
X-Send-Pr-Version: www-1.0
>Number: 43200
>Category: kern
>Synopsis: Remove trailing comma in rump.h.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Apr 23 16:45:00 +0000 2010
>Closed-Date: Sat Apr 24 01:51:03 +0000 2010
>Last-Modified: Wed Apr 28 13:55:01 +0000 2010
>Originator: Henning Petersen
>Release: NetBSD-current
>Organization:
>Environment:
>Description:
Remove trailing comma in rump.h.
>How-To-Repeat:
>Fix:
diff -u -r1.39 rump.h
--- sys/rump/include/rump/rump.h 21 Apr 2010 11:38:05 -0000 1.39
+++ sys/rump/include/rump/rump.h 23 Apr 2010 16:29:33 -0000
@@ -69,7 +69,7 @@
RUMP_SIGMODEL_PANIC,
RUMP_SIGMODEL_IGNORE,
RUMP_SIGMODEL_HOST,
- RUMP_SIGMODEL_RAISE,
+ RUMP_SIGMODEL_RAISE
};
/* rumpvfs */
>Release-Note:
>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/43200: Remove trailing comma in rump.h.
Date: Fri, 23 Apr 2010 22:56:04 +0000
On Fri, Apr 23, 2010 at 04:45:00PM +0000, henning.petersen@t-online.de wrote:
> Remove trailing comma in rump.h.
enums are allowed to have trailing commas, at least in C99...
--
David A. Holland
dholland@netbsd.org
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
henning.petersen@t-online.de
Cc:
Subject: Re: kern/43200: Remove trailing comma in rump.h.
Date: Fri, 23 Apr 2010 19:03:18 -0400
On Apr 23, 11:00pm, dholland-bugs@netbsd.org (David Holland) wrote:
-- Subject: Re: kern/43200: Remove trailing comma in rump.h.
| enums are allowed to have trailing commas, at least in C99...
Not in the current version of c++ though I think. Eventually but not now.
christos
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/43200 CVS commit: src/sys/rump/include/rump
Date: Sat, 24 Apr 2010 01:47:34 +0000
Module Name: src
Committed By: dholland
Date: Sat Apr 24 01:47:34 UTC 2010
Modified Files:
src/sys/rump/include/rump: rump.h
Log Message:
Remove trailing comma in enum, per PR kern/43200.
(trailing commas in enums are allowed in C99, but not C89, and possibly
not in C++, so let's be nice to older and deviant compilers)
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/rump/include/rump/rump.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 24 Apr 2010 01:51:03 +0000
State-Changed-Why:
fixed
From: Martin Husemann <martin@duskware.de>
To: Christos Zoulas <christos@zoulas.com>
Cc: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
henning.petersen@t-online.de
Subject: Re: kern/43200: Remove trailing comma in rump.h.
Date: Sat, 24 Apr 2010 05:55:50 +0200
On Fri, Apr 23, 2010 at 07:03:18PM -0400, Christos Zoulas wrote:
> Not in the current version of c++ though I think. Eventually but not now.
They have been always allowed in C++.
Trailing comma is prefered style, so what is this PR about, after all?
Martin
From: christos@zoulas.com (Christos Zoulas)
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
henning.petersen@t-online.de
Subject: Re: kern/43200: Remove trailing comma in rump.h.
Date: Sat, 24 Apr 2010 00:11:45 -0400
On Apr 24, 5:55am, martin@duskware.de (Martin Husemann) wrote:
-- Subject: Re: kern/43200: Remove trailing comma in rump.h.
| On Fri, Apr 23, 2010 at 07:03:18PM -0400, Christos Zoulas wrote:
| > Not in the current version of c++ though I think. Eventually but not now.
|
| They have been always allowed in C++.
| Trailing comma is prefered style, so what is this PR about, after all?
Yes, they seem to work in c++. There is c89 left.
christos
From: Antti Kantee <pooka@NetBSD.org>
To: Martin Husemann <martin@duskware.de>
Cc: Christos Zoulas <christos@zoulas.com>, gnats-bugs@NetBSD.org,
kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org, henning.petersen@t-online.de
Subject: Re: kern/43200: Remove trailing comma in rump.h.
Date: Sat, 24 Apr 2010 15:20:04 +0300
On Sat, Apr 24, 2010 at 05:55:50AM +0200, Martin Husemann wrote:
> On Fri, Apr 23, 2010 at 07:03:18PM -0400, Christos Zoulas wrote:
> > Not in the current version of c++ though I think. Eventually but not now.
>
> They have been always allowed in C++.
> Trailing comma is prefered style, so what is this PR about, after all?
While I have no strong opinion, we need to remember that rump.h
should be buildable on a non-NetBSD toolchain. That said, you need
a C99 compiler for the NetBSD kernel, so situations where this has
any practical relevance are likely far and apart.
And, actually, trailing comma for enums is not preferred style (+).
But I propose we change it -- not getting diffs for the previous
line when appending an enum is useful.
+)
/* $NetBSD: style,v 1.46 2010/04/24 00:54:07 christos Exp $ */
[...]
/* Enum types are capitalized. No comma on the last element. */
enum enumtype {
ONE,
TWO
} et;
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
henning.petersen@t-online.de
Cc:
Subject: Re: kern/43200: Remove trailing comma in rump.h.
Date: Sat, 24 Apr 2010 11:05:20 -0400
On Apr 24, 12:25pm, pooka@NetBSD.org (Antti Kantee) wrote:
-- Subject: Re: kern/43200: Remove trailing comma in rump.h.
| While I have no strong opinion, we need to remember that rump.h
| should be buildable on a non-NetBSD toolchain. That said, you need
| a C99 compiler for the NetBSD kernel, so situations where this has
| any practical relevance are likely far and apart.
Yes, but we have tools in userland that should be buildable with non
c99 compilers, specially the bootstrap ones.
| And, actually, trailing comma for enums is not preferred style (+).
| But I propose we change it -- not getting diffs for the previous
| line when appending an enum is useful.
|
| +)
|
| /* $NetBSD: style,v 1.46 2010/04/24 00:54:07 christos Exp $ */
| [...]
| /* Enum types are capitalized. No comma on the last element. */
| enum enumtype {
| ONE,
| TWO
| } et;
As long as you make it clear that for portability tools should not
have the trailing comma, but the kernel and non-tools userland programs
should.
christos
From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/43200: Remove trailing comma in rump.h.
Date: Sat, 24 Apr 2010 11:33:39 -0400
On Sat, 24 Apr 2010 15:10:06 +0000 (UTC)
christos@zoulas.com (Christos Zoulas) wrote:
> As long as you make it clear that for portability tools should not
> have the trailing comma, but the kernel and non-tools userland programs
> should.
Or perhaps can/could/may, rather than should?
--
Matt
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
henning.petersen@t-online.de
Cc:
Subject: Re: kern/43200: Remove trailing comma in rump.h.
Date: Sat, 24 Apr 2010 11:40:30 -0400
On Apr 24, 3:35pm, mm_lists@pulsar-zone.net (Matthew Mondor) wrote:
-- Subject: Re: kern/43200: Remove trailing comma in rump.h.
| The following reply was made to PR kern/43200; it has been noted by GNATS.
|
| From: Matthew Mondor <mm_lists@pulsar-zone.net>
| To: gnats-bugs@NetBSD.org
| Cc:
| Subject: Re: kern/43200: Remove trailing comma in rump.h.
| Date: Sat, 24 Apr 2010 11:33:39 -0400
|
| On Sat, 24 Apr 2010 15:10:06 +0000 (UTC)
| christos@zoulas.com (Christos Zoulas) wrote:
|
| > As long as you make it clear that for portability tools should not
| > have the trailing comma, but the kernel and non-tools userland programs
| > should.
|
| Or perhaps can/could/may, rather than should?
Well, then they "may" not cross-build on systems that have c89 compilers.
christos
From: David Laight <david@l8s.co.uk>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/43200: Remove trailing comma in rump.h.
Date: Wed, 28 Apr 2010 14:53:23 +0100
On Sat, Apr 24, 2010 at 04:15:04AM +0000, Christos Zoulas wrote:
>
> | On Fri, Apr 23, 2010 at 07:03:18PM -0400, Christos Zoulas wrote:
> | > Not in the current version of c++ though I think. Eventually but not now.
> |
> | They have been always allowed in C++.
> | Trailing comma is prefered style, so what is this PR about, after all?
>
> Yes, they seem to work in c++. There is c89 left.
gcc will allow them, sun's C++ compiler doesn't.
David
--
David Laight: david@l8s.co.uk
>Unformatted:
(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.