bug-gnulib
[Top][All Lists]
Advanced

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

Re: [New module] Persistent Hash Array Mapped Tries (HAMTs)


From: Paul Eggert
Subject: Re: [New module] Persistent Hash Array Mapped Tries (HAMTs)
Date: Sat, 10 Oct 2020 11:19:29 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 10/10/20 8:04 AM, Marc Nieper-Wißkirchen wrote:
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L &&
!defined (__STD_NO_ATOMICS__)

I am asking because there may be non-C11 compilers that nevertheless
understand _Atomic.

I suggest not worrying about this problem until we run into it. Quite possibly any actual problem will be something like "_Atomic can be used for most things, but not for feature X" in which case we'll likely want the more fine-grained check anyway. Until we discover actual problems we can get by with

   #if __STDC_VERSION__ < 201112 || defined __STD_NO_ATOMICS__

which is a cleaner way of writing the negative of the above test. These days there should be no reason to check whether __STDC_VERSION__ is defined, generally it's clearer to use "<" instead of ">=" so that textual order reflects numeric order, and the parens after "defined" are better omitted.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]