[PATCH] Remove unused include from Profile Mode header
Jonathan Wakely
jwakely@redhat.com
Fri Jan 13 17:20:00 GMT 2017
This profile mode header includes <functional>, which includes
<unordered_map> and <vector> in C++17 mode, and they try to include
the profile mode headers, and we end up in a cycle and so the content
of the headers is skipped by the header guards.
It doesn't look like profile mode needs <functional> anyway, so we can
just remove it. In stage 1 I'll look at changing <functional> to
include <bits/unordered_map.h> and <bits/stl_vector.h> directly,
skipping any Debug/Profile mode wrappers.
This fixes the last FAIL with --target_board=unix/-std=gnu++17 - yay!
* include/profile/base.h: Remove unused header that leads to header
cycle in C++17 mode.
Tested powerpc64le-linux, normal mode, profile mode, --disable-pch,
--target_board=unix/-std=gnu++17 and other variations too.
Committed to trunk.
-------------- next part --------------
commit 801c276e7b7dff4f4463b46c8ce1fe1ab22040b3
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Jan 13 15:51:06 2017 +0000
Remove unused include from Profile Mode header
* include/profile/base.h: Remove unused header that leads to header
cycle in C++17 mode.
diff --git a/libstdc++-v3/include/profile/base.h b/libstdc++-v3/include/profile/base.h
index e6ba43e..7e1a6a8 100644
--- a/libstdc++-v3/include/profile/base.h
+++ b/libstdc++-v3/include/profile/base.h
@@ -31,7 +31,6 @@
#ifndef _GLIBCXX_PROFILE_BASE_H
#define _GLIBCXX_PROFILE_BASE_H 1
-#include <functional>
#include <profile/impl/profiler.h>
// Profiling mode namespaces.
More information about the Libstdc++
mailing list