From patchwork Mon Aug 13 18:57:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 957215 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-483585-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="LI+TAiCG"; dkim-atps=neutral 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 41q4jp2DFFz9rvt for ; Tue, 14 Aug 2018 04:57:50 +1000 (AEST) 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=e2+B1+3EQ/+D62sBPkORjlolUJ2vHAclUC7rNVEoEvNFPsLA0gC7B s5FDaJfKHVC/PddeD7UPb6/JAZVadFkRen+IyfPiZIjti//3/OgzW5f7XWFNJ0aa vKQrD5E2wO/yyaoBc2PiYo1CF59GRwwklH9Ph/uGGHQJb85uc/1dTE= 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=bBBLNfPT1VseB7uKbfjqrge1+FY=; b=LI+TAiCGwrsn6PfY2pQO yai2qYs4O5u1HUlGKAIsa7BaiVSdMWsJbSQ9YLIDRRtqJ/ZBamiFAmBnQS+PfUQG gI2oDrdn4PZA9T+zOesx5110i5kXNetz3laZT9Mis0nLx0fyV5XZ5nrAabEbJ6/4 sgecb1x9VSY3wQLh5RcQo5A= Received: (qmail 112703 invoked by alias); 13 Aug 2018 18:57:42 -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 112684 invoked by uid 89); 13 Aug 2018 18:57:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=17_intro, Install, __cplusplus 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; Mon, 13 Aug 2018 18:57:40 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7499891511; Mon, 13 Aug 2018 18:57:39 +0000 (UTC) Received: from localhost (ovpn-117-178.phx2.redhat.com [10.3.117.178]) by smtp.corp.redhat.com (Postfix) with ESMTP id 252EB5D6A3; Mon, 13 Aug 2018 18:57:39 +0000 (UTC) Date: Mon, 13 Aug 2018 19:57:38 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] Add and to freestanding headers Message-ID: <20180813185738.GA10224@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.2 (2017-12-15) * include/Makefile.am: Install and for freestanding. * include/Makefile.in: Regenerate. * testsuite/17_intro/freestanding.cc: Check for and . Tested x86_64-linux, committed to trunk. commit 4c758384cab0b274b0d7626411483c5b366b308d Author: Jonathan Wakely Date: Mon Aug 13 13:39:48 2018 +0100 Add and to freestanding headers * include/Makefile.am: Install and for freestanding. * include/Makefile.in: Regenerate. * testsuite/17_intro/freestanding.cc: Check for and . diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 70db3cb6260..271695806ff 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -1359,10 +1359,10 @@ install-data-local: install-freestanding-headers endif # This is a subset of the full install-headers rule. We only need , -# , , , , , , , -# , , , , , -# , , , and any files which they include (and -# which we provide). +# , , , , , , , +# , , , , , , +# , , , , and any files which they include +# (and which we provide). # , , , and are installed by # libsupc++, so only the others and the sub-includes are copied here. install-freestanding-headers: @@ -1375,7 +1375,7 @@ install-freestanding-headers: ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h; do \ $(INSTALL_DATA) $${file} $(DESTDIR)${host_installdir}; done $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir} - for file in limits type_traits atomic; do \ + for file in limits type_traits atomic bit version; do \ $(INSTALL_DATA) ${std_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${std_builddir}; done $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir} for file in ciso646 cstddef cfloat climits cstdint cstdlib \ diff --git a/libstdc++-v3/testsuite/17_intro/freestanding.cc b/libstdc++-v3/testsuite/17_intro/freestanding.cc index e5126ce5926..4c8498707c4 100644 --- a/libstdc++-v3/testsuite/17_intro/freestanding.cc +++ b/libstdc++-v3/testsuite/17_intro/freestanding.cc @@ -30,6 +30,10 @@ #include #include +// C++2a headers: +#include +#include + int main() { std::exception e; @@ -47,5 +51,10 @@ int main() std::initializer_list ilisti __attribute__((unused)); +#if __cplusplus > 201703L + static_assert( std::ispow2(256u) ); + static_assert( __cpp_lib_void_t >= 201411L ); +#endif + return 0; }