[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-grep] Re: Changes to grep/ChangeLog
From: |
Aharon Robbins |
Subject: |
Re: [bug-grep] Re: Changes to grep/ChangeLog |
Date: |
Thu, 16 Dec 2004 15:43:16 +0200 |
> Stepan Kasal wrote:
> > Index: grep/ChangeLog
> > diff -u grep/ChangeLog:1.210 grep/ChangeLog:1.211
> > --- grep/ChangeLog:1.210 Thu Dec 16 07:18:15 2004
> > +++ grep/ChangeLog Thu Dec 16 08:19:29 2004
> > @@ -1,3 +1,15 @@
> > +2004-12-16 Stepan Kasal <address@hidden>
> > +
> > + Cosmetic changes, mostly imported from gawk:
> > +
> > + * src/dfa.c (lexstart): Removed unused variable.
> > + (parse_bracket_exp_mb): Don't initialize different pointers in one
> > + assignment
> > + (lex): Don't initialize automatic arrays, it's invalid in pre-C89
> > + compilers.
From: Julian Foad <address@hidden>
> I think the description of and reason for this change are actually closer to:
>
> "Don't use non-constant array initialisers, as they are invalid in C89."
No, Stepan's remark is correct.
foo ()
{
int foo[] = { 1, 42 };
...
}
IS valid in 1989 Standard C. It is NOT valid in so-called K&R C.
There are some compilers that claim to be standard C but that
really aren't. E.g., they'll allow prototypes, but they won't
allow array declarations such as the above.
Arnold