From: Andreas Schwab <schwab@suse.de>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Mikael Pettersson <mikpe@it.uu.se>,
Jacek Luczak <difrost.kernel@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: Comma at end of enum lists
Date: Sat, 29 Mar 2008 19:47:34 +0100 [thread overview]
Message-ID: <jeprtde5a1.fsf@sykes.suse.de> (raw)
In-Reply-To: <alpine.LNX.1.10.0803291923350.28605@fbirervta.pbzchgretzou.qr> (Jan Engelhardt's message of "Sat\, 29 Mar 2008 19\:24\:27 +0100 \(CET\)")
Jan Engelhardt <jengelh@computergmbh.de> writes:
> On Saturday 2008-03-29 19:13, Andreas Schwab wrote:
>>> In a language with strict a comma-as-separator rule you can
>>> get this benefit by placing the comma before new items rather
>>> than after existing items:
>>>
>>> enum { FOO
>>> ,FIE
>>> ,FUM
>>> };
>>>
>>> but luckily C doesn't need this perversion.
>>
>> Only since C99 (but GNU C never needed it either).
>
> C had this for much longer than 99. Borland Turbo C from around 1990
> (which you can expect to be C89 if you have luck) also allows , at the end.
C89 definitely does not allow a comma at the end of the enumerator list
(only at the end of the initializer list). If Borland C allows it in
its strict C89 mode (if it has such a thing) then it is buggy.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2008-03-29 18:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-29 17:00 Comma at end of enum lists Jacek Luczak
2008-03-29 17:19 ` Mikael Pettersson
2008-03-29 17:22 ` Jacek Luczak
2008-03-29 18:13 ` Andreas Schwab
2008-03-29 18:24 ` Jan Engelhardt
2008-03-29 18:47 ` Andreas Schwab [this message]
2008-03-29 17:20 ` H. Peter Anvin
2008-03-29 17:25 ` Al Viro
2008-03-29 17:26 ` Jacek Luczak
2008-03-29 17:56 ` Al Viro
2008-03-29 17:57 ` H. Peter Anvin
2008-03-29 17:28 ` H. Peter Anvin
2008-03-29 17:42 ` Jan Engelhardt
2008-03-29 17:52 ` Al Viro
2008-03-29 17:54 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jeprtde5a1.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=difrost.kernel@gmail.com \
--cc=jengelh@computergmbh.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@it.uu.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.