This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: notes on current atomics config and usage
Paolo Carlini wrote:
> As a first step in this large project, when I will be back from a few
> days of vacations, I will start on implementing __GCC_ATOMIC_BUILTINS.
Great!
Since I bet things like this will come up again in future, I suggest the
following standard:
Feature macros for GCC begin with the prefix __GCC_HAVE_<X> where X is
the name of the feature. If the feature is not supported in the current
configuration, then the macro will be undefined. If the feature is
defined, then its value is a number indicating a version for the
feature. The first version of the feature defines the macro to 1. If
the feature is modified or extended in an important way, then the
version number is increased.
The idea here is that you define __GCC_HAVE_ATOMIC_BUILTINS to 1 now;
then, if we add a new builtin in future, we increase that to 2, etc.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713