bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/5] {maint} restore C90 compliance


From: Akim Demaille
Subject: Re: [PATCH 0/5] {maint} restore C90 compliance
Date: Fri, 28 Dec 2012 11:34:52 +0100

Le 13 déc. 2012 à 18:48, Paul Eggert <address@hidden> a écrit :

> Coreutils's README says "you should have a C99-conforming
> compiler, due to the use of declarations after non-declaration
> statements in several files in src/" which is a bit of an
> exaggeration since it needs just C89 with a few C99 features,
> notably declarations after statements.

This is tempting.  Bison being a maintainer tool, I guess its
audience has typically better compilers than on average.  So
I expect it would not be a problem to have the same requirements.

I also see that there are also some uses of a declaration in the
for-loops, but surprisingly few:

address@hidden ~/src/gnu/coreutils $ git grep -P 'for \(\w+ \w+'
ChangeLog-2005: (parse_options): Give a diagnostic for (but still accept) the
gl/lib/rand-isaac.c:  for (int i = 0; i < 4; i++)              /* scramble it */
gl/lib/rand-isaac.c:  for (int i = 0; i < 4; i++)              /* scramble it */
src/csplit.c:  for (size_t count = 0; ; count++)
src/ls.c:      for (int i = 0; i < 12; i++)
src/stat.c:                      for (char const *src = dst; src < p; src++)
src/stat.c:  for (int i = precision; i < 9; i++)

(And the first two seem to be #if 0'd).  Is it considered ok
too?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]