From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90765 invoked by alias); 21 Jun 2017 21:28:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 90732 invoked by uid 89); 21 Jun 2017 21:28:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Jun 2017 21:28:40 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7DA515BEC9; Wed, 21 Jun 2017 21:28:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7DA515BEC9 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7DA515BEC9 Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D7A9619C8; Wed, 21 Jun 2017 21:28:37 +0000 (UTC) Subject: Re: [PATCH 1/4] environ-selftests: Ignore -Wself-move warning To: Simon Marchi , Sergio Durigan Junior References: <1498076108-29914-1-git-send-email-simon.marchi@ericsson.com> <1498076108-29914-2-git-send-email-simon.marchi@ericsson.com> <87mv91ccey.fsf@sergiodj.net> <884719ed975085085337b2972a9c2ac4@polymtl.ca> Cc: Simon Marchi , gdb-patches@sourceware.org From: Pedro Alves Message-ID: Date: Wed, 21 Jun 2017 21:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <884719ed975085085337b2972a9c2ac4@polymtl.ca> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-06/txt/msg00616.txt.bz2 On 06/21/2017 10:05 PM, Simon Marchi wrote: > Yeah, I didn't expect to have to put the #ifdefs for __clang__ though. > Without them, gcc emits a warning [-Wunknown-pragma]. We always have > the option to turn -Wunknown-pragma off globally, what do you prefer? > Don't both GCC and Clang understand "#pragma GCC diagnostic" instead? Or better even, wrap it in some macros (and use _Pragma): #define DIAGNOSTIC_PUSH _Pragma ("GCC diagnostic push") #define DIAGNOSTIC_POP _Pragma ("GCC diagnostic pop") #define DIAGNOSTIC_IGNORE(option) \ _Pragma (STRINGIFY (GCC diagnostic ignored option)) Alternatively, you could replace the std::move with a cast to rvalue ref, which is just what std::move really is: -env = std::move (env); +env = static_cast (env); Thanks, Pedro Alves