> From: Jeff King [mailto:peff@xxxxxxxx] > Sent: Monday, September 10, 2012 7:59 PM > To: Joachim Schmitz > Cc: git@xxxxxxxxxxxxxxx > Subject: Re: [PATCH] daemon: restore getpeername(0,...) use > > On Mon, Sep 10, 2012 at 07:26:26PM +0200, Joachim Schmitz wrote: > > > >>as are non-const array intializers, e.g.: > > >> > > >> const char *args[] = { editor, path, NULL }; > > >> ^ > > >>".../git/editor.c", line 39: error(122): expression must have a > > >>constant value > > >> > > >>So git source is not plain C89 code (anymore?) > > > > > >I remember we excised a whole bunch of non-constant initializers at > > >some point because somebody's compiler was complaining. But I suppose > > >this one has slipped back in, because non-constant initializers are > > >so damn useful. And nobody has complained, which I imagine means > > >nobody has bothered building lately on those older systems that > > >complained. > > > > OK, record my complaint then ;-) > > Oops, did I say "complained"? I meant "sent patches". Hint, hint. :) Oops ;-) > > At least some older release of HP NonStop only have C89 and are still in use > > > > And tying to compile in plain C89 mode revealed several other > > problems too (e.g. size_t seems not to be typedef'd?) > > I think it is a mistake to set -std=c89 (or whatever similar option your > compiler supports). Like I said, we are not interested in being strictly > C89-compliant. We are interested in working on real-world systems. > > If your compiler complains in the default mode (or when it is given some > reasonable practical settings), then that's something worth fixing. But > if your compiler is perfectly capable of compiling git, but you choose > to cripple it by telling it to be pedantic about a standard, then that > is not git's problem at all. Older version of HP NonStop only have a c89 compiler, newer have a -Wc99lite switch to that, which enables some C99 features and the latest additionally have a c99 compiler. There's no switch to cripple something, it is just a fact that older systems don't have c99 or only limited support for it. A whole series of machines (which is still in use!) cannot get upgraded to anything better than c89. Bye, Jojo -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html