[neomutt-devel] About C flavour (Was: Refactoring's cosmetics 💄)

Stuart Henderson stu at spacehopper.org
Thu Jan 26 10:26:33 CET 2017


On 2017/01/25 23:12, Guyzmo wrote:
> On Wed, Jan 25, 2017 at 09:46:08PM +0100, Guyzmo wrote:
> >  * [C flavour]
> >    * flatcap: mutt supports C99 (which isn't too bad), but not C11 there are
> >      probably more people out there with C99 compilers than with C11 compilers
> >    * clang ≥ 3.0 and GCC ≥ 4.9 have full C11 support, and both are more
> >      than 5 years old.
> 
> cf the above, I really do think we should upgrade to C11 support. It's
> supported by both recent GCC and Clang, and we really don't want to have
> to support other compilers.
> 
> If a system doesn't support a recent compiler, then it should be
> upgraded or replaced.
> 
> Also, about switching to "modern" C, that means:
> 
> - using #pragma once instead of the ifndef/define/endif dance
> - using stdbool.h and stdint.h instead of platform dependant types
> - allow one-line commenting with `//` like with C++ (and BCPL and Java)
> 
> and there, I'm only talking about C99!
> 
> There are a few nice things with C11 as well, like:
> 
> - better unicode types (char16_t and char32_t) and uchar.h
> - noreturn statement (it'd be nice to add it for the infinite^W FOREVER loops)
> - anonymous structs and unions
> - new fopen() stuff that's nice for lock files 
> 
> it's not as lovely as C99 style, but it's still worth not leaving out.

GCC 4.9 is GPLv3-licensed which some operating systems can't include
with the OS, it's usually possible to run but means an extra install (or
lengthy build if binaries aren't available).

Clang doesn't have particularly wide support for CPU architectures
(x86 and ARM are pretty good, powerpc is missing some bits, others are
not present or missing a lot).

Are the extra things in C11 nice enough to be worth cutting out some
users?



More information about the neomutt-devel mailing list