[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: SQL backend C source error (Was: ITS#2309)

> Well, I'm not sure what standard of C allows for structures to be
> statically  initialized. The construct "{ AAA, BBB }" is for static
> initialization of  arrays. Now, if I wanted to extend C specification to
> allow for structs to be  initialized statically, then that is what I's
> use or "( AAA, BBB )", but that  resembles function call too much.
> I suppose GNU CC allows that, just as it allows indented CPP directives
> (a  common source of headaches when compiling with DEC CC and the first
> thing I  cleanup in any source package). I would like not to be
> arrogant, demanding for  "C correctness", but is there a standard? (Yes,
> *several* of them :-))

Someone could object that gcc *IS* the standard ...

I don't want to start an argument about this; I've always been in favour
of standards, they really ease our lives.  It is OpenLDAP's commitment
to ensure code portability, and in many occasions the decision on how
to implement some feature, or even whether to include it or not, was based
on prtability and standard compliance.  Unfortunately it is not practical
to work with the (often harly readable) book of standards in front.
It is my personal commitment to be able to compile everything with --ansi
(and --pedantic if possible) and I always work with --Wall; unfortunately,
some of the packages OpenLDAP uses do not compile with these switches on,
so it may well happen that some nonportable instructions slip into the

> Thank you for being thoughtful of us who do not use C compilers with
> extended  syntax and making the source more compliant.

I think you did a good service to all the OpenLDAP community, since
we cannot be able to assess portability except on the systems we're
using.  Feedback is always welcome.  Thanks,


Pierangelo Masarati