[pacman-dev] [PATCH] Use C18 language standard
Allan McRae
allan at archlinux.org
Fri Mar 27 23:07:45 UTC 2020
On 28/3/20 5:52 am, Anatol Pomozov wrote:
> Hey
>
> On Thu, Mar 26, 2020 at 8:47 PM Allan McRae <allan at archlinux.org> wrote:
>>
>> On 27/3/20 7:13 am, Anatol Pomozov wrote:
>>> C18 is the latest released version of the language spec. The toolchains support
>>> it starting with GCC 8.1.0 and Clang 7.
>>>
>>
>> GCC 8.1.0 - May 2, 2018
>> Clang 7 - 19 September 2018
>>
>> So available for 18 months. Seems reasonable given the next release is
>> a few months out minimum.
>>
>> But why do we need this version? What feature will be used? Is C11
>> enough?
>
> C18 is mostly a clarification on top of C11 language spec. C18 does
> not introduce any new language features
> http://www.iso-9899.info/wiki/The_Standard#C18
Hence why do we need that. Every newer bit of software we require
limits where pacman can be built.
> C11 is what was a big step for C language. I use C11 feature in my
> other projects and I really like it. Some of my favorite features are:
> - type-generic expressions. This is a poor-man generic that can be
> used in macros. Quite useful in some cases for example instead of
> having htobe16/htobe32/htobe64/.. this feature allows to have a macro
> htobe() with functionality that depends on the parameter type.
> - _Thread_local specifier that allows to introduce a thread-local variables
> - defines for atomic types + functions for accessing the vars in atomic way
I don't need to know what is in the standard. What features do you plan
to use in the pacman code base and where?
A
More information about the pacman-dev
mailing list