From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34662 invoked by alias); 22 Dec 2016 15:40:10 -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 34641 invoked by uid 89); 22 Dec 2016 15:40:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*MI:sk:87bmw4u, H*i:sk:87bmw4u, H*f:sk:87bmw4u 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; Thu, 22 Dec 2016 15:39:59 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2D59DC07EFF2; Thu, 22 Dec 2016 15:39:58 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uBMFduC7019429; Thu, 22 Dec 2016 10:39:57 -0500 Subject: Re: [RFA 7/8] Use unique_xmalloc_ptr in execute_gdb_command To: Tom Tromey References: <1480395946-10924-1-git-send-email-tom@tromey.com> <1480395946-10924-8-git-send-email-tom@tromey.com> <878ts2yi5m.fsf@tromey.com> <87inqletsw.fsf@tromey.com> <7f11b7bb-bebb-1cd3-1e92-266638272443@redhat.com> <87vaueuqoh.fsf@tromey.com> <819d6d1b-1afb-277c-3bf4-e8cc5884ac43@redhat.com> <874m1w6mt0.fsf@tromey.com> <2061e336-0e17-fd9a-b746-61f6fa788beb@redhat.com> <87bmw4ugmb.fsf@tromey.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <5f00ca37-676c-7625-8855-f6b46d9b968a@redhat.com> Date: Thu, 22 Dec 2016 15:40: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: <87bmw4ugmb.fsf@tromey.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-12/txt/msg00375.txt.bz2 On 12/22/2016 03:29 PM, Tom Tromey wrote: > C++17 isn't > official yet, and presumably even if we had some value for __cplusplus > to check, we'd also have to check for when exactly it was added to g++? According to: https://gcc.gnu.org/projects/cxx-status.html that could be checked with __has_cpp_attribute(nodiscard). >From that page, seems like G++ 4.8 had an [[gnu::warn_unused_result]] alternative that perhaps works on C++11 too. I have no experience with it though. But as I said, we can always add this later. Thanks, Pedro Alves