From patchwork Tue Feb 1 18:18:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 81346 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 73843B70EC for ; Wed, 2 Feb 2011 05:19:10 +1100 (EST) Received: (qmail 17879 invoked by alias); 1 Feb 2011 18:19:07 -0000 Received: (qmail 17856 invoked by uid 22791); 1 Feb 2011 18:19:06 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from vsmtp1.tin.it (HELO vsmtp1.tin.it) (212.216.176.141) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Feb 2011 18:19:00 +0000 Received: from [192.168.0.4] (79.53.82.179) by vsmtp1.tin.it (8.0.022) id 4CFE55C704C34719; Tue, 1 Feb 2011 19:18:57 +0100 Message-ID: <4D484E8F.6040309@oracle.com> Date: Tue, 01 Feb 2011 19:18:55 +0100 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: libstdc++ Subject: [v3] libstdc++/46914 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, tested x86_64-linux multilib (with --with-arch-32=i486), committed mainline and 4_5-branch (very slightly tweaked). Paolo. //////////////////// 2011-02-01 Paolo Carlini PR libstdc++/46914 * include/bits/atomic_0.h (_ATOMIC_STORE_, _ATOMIC_MODIFY_, _ATOMIC_CMPEXCHNG_): Rename __v -> __w, and __m -> __n, to avoid name conflicts. Index: include/bits/atomic_0.h =================================================================== --- include/bits/atomic_0.h (revision 169491) +++ include/bits/atomic_0.h (working copy) @@ -1,6 +1,6 @@ // -*- C++ -*- header. -// Copyright (C) 2008, 2009, 2010 +// Copyright (C) 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -68,41 +68,41 @@ atomic_flag_clear_explicit(__g, __x); \ __r; }) -#define _ATOMIC_STORE_(__a, __m, __x) \ +#define _ATOMIC_STORE_(__a, __n, __x) \ ({typedef __typeof__(_ATOMIC_MEMBER_) __i_type; \ __i_type* __p = &_ATOMIC_MEMBER_; \ - __typeof__(__m) __v = (__m); \ + __typeof__(__n) __w = (__n); \ __atomic_flag_base* __g = __atomic_flag_for_address(__p); \ __atomic_flag_wait_explicit(__g, __x); \ - *__p = __v; \ + *__p = __w; \ atomic_flag_clear_explicit(__g, __x); \ - __v; }) + __w; }) -#define _ATOMIC_MODIFY_(__a, __o, __m, __x) \ +#define _ATOMIC_MODIFY_(__a, __o, __n, __x) \ ({typedef __typeof__(_ATOMIC_MEMBER_) __i_type; \ __i_type* __p = &_ATOMIC_MEMBER_; \ - __typeof__(__m) __v = (__m); \ + __typeof__(__n) __w = (__n); \ __atomic_flag_base* __g = __atomic_flag_for_address(__p); \ __atomic_flag_wait_explicit(__g, __x); \ __i_type __r = *__p; \ - *__p __o __v; \ + *__p __o __w; \ atomic_flag_clear_explicit(__g, __x); \ __r; }) -#define _ATOMIC_CMPEXCHNG_(__a, __e, __m, __x) \ +#define _ATOMIC_CMPEXCHNG_(__a, __e, __n, __x) \ ({typedef __typeof__(_ATOMIC_MEMBER_) __i_type; \ __i_type* __p = &_ATOMIC_MEMBER_; \ __typeof__(__e) __q = (__e); \ - __typeof__(__m) __v = (__m); \ + __typeof__(__n) __w = (__n); \ bool __r; \ __atomic_flag_base* __g = __atomic_flag_for_address(__p); \ __atomic_flag_wait_explicit(__g, __x); \ __i_type __t = *__p; \ if (*__q == __t) \ - { \ - *__p = (__i_type)__v; \ - __r = true; \ - } \ + { \ + *__p = (__i_type)__w; \ + __r = true; \ + } \ else { *__q = __t; __r = false; } \ atomic_flag_clear_explicit(__g, __x); \ __r; })