Re: [dev] [ubase] [PATCH] Bring back C89/C90

From: FRIGN <dev_AT_frign.de>
Date: Wed, 4 Jun 2014 17:51:16 +0200

On Wed, 4 Jun 2014 11:46:18 -0400
Nick <suckless-dev_AT_njw.me.uk> wrote:

> Umm. In what way is the trailing comma an error? Leaving trailing
> commas in structs is always reasonable (as far as I know), so you
> can move things around / add things without messing with the last
> line. Is there some reason you wouldn't want that with this enum?
>
> Or am I missing something?

No, I chose the wrong word for that.
Definitely it makes it easier to extend structs and enums, but why
leave it there?
Code is written wronce and read many times. I don't know about you, but
it confuses me when there's a trailing comma.
It's actually non-defined behaviour according to the standard. It'd be
ok if the standard said it was arbitrary if there are trailing commas
or not, but at the moment, the compiler is just generous enough to
ignore it and just pops a warning with -pedantic.

Cheers

FRIGN

-- 
FRIGN <dev_AT_frign.de>
Received on Wed Jun 04 2014 - 17:51:16 CEST

This archive was generated by hypermail 2.3.0 : Wed Jun 04 2014 - 18:00:15 CEST