This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C PATCH] Allow ATOMIC_*_LOCK_FREE in #if directive (DR#458)


On Thu, 14 Aug 2014, Marek Polacek wrote:

> The DR#458 is about the usage of ATOMIC_*_LOCK_FREE macros defined in
> stdatomic.h in the #if directives.  Proposed Technical Corrigendum of
> this DR is that these macros should expand to constant expressions
> suitable for use in #if preprocessing directives.  This patch does
> that by mapping these macros to __GCC_ATOMIC_*_LOCK_FREE variants
> defined in c-cppbuiltin.c:cpp_atomic_builtins.  (It's what libsupc++
> does.)  The current implementation wouldn't work in #if directives.
> 
> Bootstrapped/regtested on x86_64-linux, ok for trunk?

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]