From patchwork Fri Jun 13 11:18:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 359502 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E51931400EA for ; Fri, 13 Jun 2014 21:18:35 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=XCd/DhBD1/jq1CvLOXnFmm7rmzGD94mbixt8XITbRZObwzxGSw0Lp 8CpAxLniZZsdITlNIg2JEjUWbaARwRCB9FheDGr5hpBy02H5atOQY5wwGLzuN9PJ c3xrFd3Oy+IhU6CFQSf+y6yAh2pU6c32F6RYwipJ8c8VhW65x5MuAA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=BtQT6E504TCP+ZS3iywN/n1deiE=; b=yurwMhcn+GRmNRE7zTfS TA80oy6hlcuwRMJXsLNJBEVn/k4hQpfRXgiq8ATx2JmrzFPsPWMaFPj7nSgAEUbv 0OPhgYF3p/VKjrDQQMve/MfFBy0a7g0SC4DdhuhmImGPuWGIXVsaZ1IR/My8DByF enQdaVi+hUCGjr3jeDbLvh0= Received: (qmail 2873 invoked by alias); 13 Jun 2014 11:18:17 -0000 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 Received: (qmail 2851 invoked by uid 89); 13 Jun 2014 11:18:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients 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; Fri, 13 Jun 2014 11:18:14 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5DBIDjt013776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Jun 2014 07:18:13 -0400 Received: from localhost (vpn1-4-149.ams2.redhat.com [10.36.4.149]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5DBIC2V021403; Fri, 13 Jun 2014 07:18:12 -0400 Date: Fri, 13 Jun 2014 12:18:11 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [patch] Add #warning to in 4.8 branch and remove tests Message-ID: <20140613111811.GD30729@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) How do people feel about this change, to add a #warning to the header saying it's not implemented? This might stop people reporting bugs that it doesn't work (we know!) or complaining that the code shouldn't be shipped if it doesn't work. Now that we have an implementation in the 4.9.0 release we can direct people to that. We might as well stop testing the non-functional code in the 4.8 branch as well (that's just 'git rm -r testsuite/28_regex' but not shown in this patch). commit baaad1f3a498a3cac87e84640ba8880532cd3032 Author: Jonathan Wakely Date: Fri Jun 13 11:52:37 2014 +0100 * include/std/regex: Add warning. * src/c++11/regex.cc: Suppress warning. * include/precompiled/stdc++.h: Do not include . * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Likewise. * testsuite/28_regex/*: Remove. diff --git a/libstdc++-v3/include/precompiled/stdc++.h b/libstdc++-v3/include/precompiled/stdc++.h index 195377d..a4da234 100644 --- a/libstdc++-v3/include/precompiled/stdc++.h +++ b/libstdc++-v3/include/precompiled/stdc++.h @@ -105,7 +105,6 @@ #include #include #include -#include #include #include #include diff --git a/libstdc++-v3/include/std/regex b/libstdc++-v3/include/std/regex index 907f5bb..3f5e5a1 100644 --- a/libstdc++-v3/include/std/regex +++ b/libstdc++-v3/include/std/regex @@ -35,6 +35,10 @@ # include #else +#ifndef _GLIBCXX_REGEX_NO_WARNING +#warning The header is not implemented in versions older than GCC 4.9.0 +#endif + #include #include #include diff --git a/libstdc++-v3/src/c++11/regex.cc b/libstdc++-v3/src/c++11/regex.cc index b18afe2..8362dbc 100644 --- a/libstdc++-v3/src/c++11/regex.cc +++ b/libstdc++-v3/src/c++11/regex.cc @@ -22,6 +22,7 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // . +#define _GLIBCXX_REGEX_NO_WARNING #include namespace std _GLIBCXX_VISIBILITY(default) diff --git a/libstdc++-v3/testsuite/17_intro/using_namespace_std_tr1_neg.cc b/libstdc++-v3/testsuite/17_intro/using_namespace_std_tr1_neg.cc index 94d4140..c07f50a 100644 --- a/libstdc++-v3/testsuite/17_intro/using_namespace_std_tr1_neg.cc +++ b/libstdc++-v3/testsuite/17_intro/using_namespace_std_tr1_neg.cc @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -66,4 +65,4 @@ namespace gnu using namespace std::tr1; // { dg-error "is not a namespace-name" } } -// { dg-error "expected namespace-name before" "" { target *-*-* } 66 } +// { dg-error "expected namespace-name before" "" { target *-*-* } 65 }