xfconf-errors.h enum error

Mike Massonnet mmassonnet at gmail.com
Mon Aug 3 23:11:51 CEST 2009


2009/8/3 Brian J. Tarricone <brian at tarricone.org>:
> On 08/03/2009 09:04 AM, Bo Lorentsen wrote:
>>
>> In other words ... I think it is an error. If you look at page 215 in
>> K&R (second ed), you will see that en enumerator-list does not have a
>> tailing comma :-)
>
> I would most certainly not use a K&R C book when looking or examples as to
> what is or isn't valid C these days.  Trailing commas in enums are just
> fine, and I prefer writing code that way so changing the enum later (to add
> or remove items) reduces diff/vcs clutter.

And to me, my laziness, it is just as quick as typing yyp in vim, or
shift+down copy/paste in any "normal" gui editor :-p No need to add an
extra comma and "all that" crap. Btw, now going off-topic, I love the
use of $(NULL) in the automake scripts, it acts like the comma and
offers the quick copy/paste to add new files:
NULL=
SOURCES=\
 file1 \
 file2 \
 $(NULL)
Specially useful when there are lots of tabs behind the filenames.

> [/me googles a bit...]
>
> Ah, I see.  Stop compiling with -pedantic and you'll be fine ^_~.  I don't
> test with -pedantic and don't guarantee any of my code will compile with it.

Impressive googling, I hadn't the slighest clue for this.

>        -brian

Mike



More information about the Xfce4-dev mailing list