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

Re: [Freeipa-devel] [PATCH 0026] Enable building in C99 mode



On 17.12.2013 10:12, Jakub Hrozek wrote:
On Tue, Dec 17, 2013 at 08:19:09AM +0100, Jan Cholasta wrote:
Hi,

On 16.12.2013 22:12, Nathaniel McCallum wrote:
Patch attached.

Care to elaborate? There's no ticket or explanation why this is
beneficial or necessary.

We had a short chat with Nathaniel yesterday on IRC about which C standards
we, as a project, allow. I think this patch is a result of that discussion.

SSSD has had -std=gnu99 in the default CFLAGS for more than a year now.

I think we can safely support C99 and its features now, it's almost 2014
and all major compilers support the features we care about. But I think
this change should go hand-in-hand with amending
http://www.freeipa.org/page/Coding_Style

For instance, would variable-length arrays considered OK? (I would vote
yes),

Please no. You can't catch the error if the memory allocation fails for whatever reason and the process will killed by OS.

(There is a question if you want to handle memory allocation failures at all, of course.)

> would intermingled code and declarations be considered OK (I
personally dislike these), etc?

Neither do I :-)

--
Petr^2 Spacek


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