This is the mail archive of the
mailing list for the GCC project.
Re: [C PATCH] Allow ATOMIC_*_LOCK_FREE in #if directive (DR#458)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 14 Aug 2014 17:51:33 +0000
- Subject: Re: [C PATCH] Allow ATOMIC_*_LOCK_FREE in #if directive (DR#458)
- Authentication-results: sourceware.org; auth=none
- References: <20140814174747 dot GD28810 at redhat dot com>
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?
Joseph S. Myers