From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id C8564385BAEE for ; Fri, 16 Sep 2022 22:33:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C8564385BAEE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663367618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q/XJnrMHYD7srMqspkHym0/q9hgrU8KhDvG6s7HFCrM=; b=Wm0xoLZ9hM+V0fj1QCa5hZpcoPUwE08X/TOGbTRt0dRV78bfvDhOSL8zD+OWGG98iViguP dgWu7WKiAxG2ETQ2oxJhbLmIc1xPPFZSq0ev6sTi2JaHLroy3BAPXHdBCkLh0TR+78ZohJ NlOLnz/UZHHMDNPqVujMSC7ydbGwwME= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-587-w7F-KKG4MQqmwhR-aT-Okw-1; Fri, 16 Sep 2022 18:33:35 -0400 X-MC-Unique: w7F-KKG4MQqmwhR-aT-Okw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2D7448001B8; Fri, 16 Sep 2022 22:33:35 +0000 (UTC) Received: from localhost (unknown [10.33.36.214]) by smtp.corp.redhat.com (Postfix) with ESMTP id E99C740C2064; Fri, 16 Sep 2022 22:33:34 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Make more internal headers include their own dependencies Date: Fri, 16 Sep 2022 23:33:34 +0100 Message-Id: <20220916223334.602262-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tested x86_64-linux, pushed to trunk. -- >8 -- This adds required headers to a few internal headers that currently assume their deps will be included first. It's more robust to make them include their own dependencies, so that later refactoring or reuse of those headers in new contexts doesn't break. libstdc++-v3/ChangeLog: * include/bits/stl_algo.h: Include . * include/bits/stl_tempbuf.h: Include headers for __try and __catch macros, std::pair, and __gnu_cxx::__numeric_traits. * include/bits/stream_iterator.h: Include and headers for std::addressof and std::iterator. * include/bits/streambuf_iterator.h: Include header for std::iterator. * include/std/iterator: Do not include . --- libstdc++-v3/include/bits/stl_algo.h | 1 + libstdc++-v3/include/bits/stl_tempbuf.h | 4 +++- libstdc++-v3/include/bits/stream_iterator.h | 3 +++ libstdc++-v3/include/bits/streambuf_iterator.h | 1 + libstdc++-v3/include/std/iterator | 1 - 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index 57fa1c1dc55..9cb708ab2fd 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -57,6 +57,7 @@ #define _STL_ALGO_H 1 #include +#include #include #include // for _Temporary_buffer #include diff --git a/libstdc++-v3/include/bits/stl_tempbuf.h b/libstdc++-v3/include/bits/stl_tempbuf.h index 82f2dc8055f..b13aa3b0fcc 100644 --- a/libstdc++-v3/include/bits/stl_tempbuf.h +++ b/libstdc++-v3/include/bits/stl_tempbuf.h @@ -57,8 +57,10 @@ #define _STL_TEMPBUF_H 1 #include -#include +#include #include +#include +#include namespace std _GLIBCXX_VISIBILITY(default) { diff --git a/libstdc++-v3/include/bits/stream_iterator.h b/libstdc++-v3/include/bits/stream_iterator.h index 86c5845b835..0a1362a2eea 100644 --- a/libstdc++-v3/include/bits/stream_iterator.h +++ b/libstdc++-v3/include/bits/stream_iterator.h @@ -32,6 +32,9 @@ #pragma GCC system_header +#include +#include +#include #include namespace std _GLIBCXX_VISIBILITY(default) diff --git a/libstdc++-v3/include/bits/streambuf_iterator.h b/libstdc++-v3/include/bits/streambuf_iterator.h index 72344c63088..c26ac249e01 100644 --- a/libstdc++-v3/include/bits/streambuf_iterator.h +++ b/libstdc++-v3/include/bits/streambuf_iterator.h @@ -33,6 +33,7 @@ #pragma GCC system_header #include +#include #include namespace std _GLIBCXX_VISIBILITY(default) diff --git a/libstdc++-v3/include/std/iterator b/libstdc++-v3/include/std/iterator index 7f8fc50b39d..2da2fb6e4a3 100644 --- a/libstdc++-v3/include/std/iterator +++ b/libstdc++-v3/include/std/iterator @@ -61,7 +61,6 @@ #include #include #include -#include #include #include #include -- 2.37.3