From patchwork Fri Feb 15 01:26:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 220580 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 0145B2C0085 for ; Fri, 15 Feb 2013 12:26:26 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1361496387; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=aW0D7EVUnAVVqgh4tImk+7eLli0=; b=iZ2yGCVEOqLgy4y Rf9RyWm9SFv/ppv5WkRzRDDwaHmlORBZQU4HV6FDJ67tj+VQvuHjb7ljFLQ4n2V+ MhceScX2ytJL9xVP+UGbh5eofRHHKaWGhPPH5ZsjwDefHNa0Sw7kluMXb+t6hnb9 rzRB1hmTiTjHXM2VgnhXzRexD4XM= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=n6tdiabxcQaKQ/u4nD07r+drHOvZtzSetLEbWqOWmXeM60BTMBjzOkMIX9nhuE XqvjzsUbZ+Y6tnUnU6Ifn2nnsfrBWbnMsDszWZzMS2rMAr9Qsrl0SQoOLFR9xDP5 n4X03nhQbXDsw+wXVDRREhXju9KQxEgCf3Mped4GUqhqo=; Received: (qmail 4555 invoked by alias); 15 Feb 2013 01:26:22 -0000 Received: (qmail 4540 invoked by uid 22791); 15 Feb 2013 01:26:22 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, KHOP_THREADED, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Feb 2013 01:26:17 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1F1QDmi011408 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 14 Feb 2013 20:26:13 -0500 Received: from [10.3.113.52] (ovpn-113-52.phx2.redhat.com [10.3.113.52]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r1F1Q8Uu009435; Thu, 14 Feb 2013 20:26:09 -0500 Message-ID: <511D8EB0.9080808@redhat.com> Date: Thu, 14 Feb 2013 20:26:08 -0500 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:21.0) Gecko/20100101 Thunderbird/21.0a1 MIME-Version: 1.0 To: Paolo Carlini , Rainer Orth CC: gcc-patches List , libstdc++ Subject: Re: RFA: v3 PATCH to add on_quick_exit/quick_exit to std References: <51192B59.4000305@redhat.com> <511D22DA.8040706@oracle.com> <511D381D.50302@oracle.com> In-Reply-To: <511D381D.50302@oracle.com> 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 On 02/14/2013 02:16 PM, Paolo Carlini wrote: > ... or the below, just in case an interesting system provides the > *quick_exit functions but doesn't define _GLIBCXX_USE_C99. It seems rather unlikely that the system would provide some C11 functions without the corresponding C99 ones. I'm just going to #if out the whole test if the relevant functions aren't available: commit e203f2dcdf077fcf61b4d6b3f8e399c25cc44dfb Author: Jason Merrill Date: Thu Feb 14 11:15:28 2013 -0500 * testsuite/18_support/quick_exit/quick_exit.cc: #if out the whole test if unsupported. diff --git a/libstdc++-v3/testsuite/18_support/quick_exit/quick_exit.cc b/libstdc++-v3/testsuite/18_support/quick_exit/quick_exit.cc index 8e55890..b91cbe2 100644 --- a/libstdc++-v3/testsuite/18_support/quick_exit/quick_exit.cc +++ b/libstdc++-v3/testsuite/18_support/quick_exit/quick_exit.cc @@ -21,6 +21,7 @@ // 18.5 - Start and termination +#if defined(_GLIBCXX_HAVE_AT_QUICK_EXIT) && defined(_GLIBCXX_HAVE_QUICK_EXIT) #include void handler() @@ -35,9 +36,10 @@ void wrong_handler() int main() { -#if defined(_GLIBCXX_HAVE_AT_QUICK_EXIT) && defined(_GLIBCXX_HAVE_QUICK_EXIT) std::at_quick_exit (handler); std::atexit (wrong_handler); std::quick_exit (1); +} +#else +int main() {} #endif -}