aboutsummaryrefslogtreecommitdiffstats
path: root/include/ruby/backward
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-04-12 15:42:45 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-04-13 16:06:00 +0900
commitc37a357c13b399b79fb1ef197738f60cae472dbf (patch)
tree279ac6c7ce9a02a0d2fcd48e77bc42da1a8554c1 /include/ruby/backward
parent4ff3f205408ff8bb413d69151105d301858136ba (diff)
downloadruby-c37a357c13b399b79fb1ef197738f60cae472dbf.tar.gz
include what you use.
This reverts commit 443389effc37308ce1a3c3a840082a344fc6af56. This reverts commit d94960f22ec2de3a3855305cb51343806d2b46c7. Inclusion of header files must be explicit. Every file shall directly include what is necessary. https://github.com/include-what-you-use/include-what-you-use says: > When every file includes what it uses, then it is possible to edit any > file and remove unused headers, without fear of accidentally breaking > the upwards dependencies of that file. It also becomes easy to > automatically track and update dependencies in the source code. Though we don't use iwyu itself, the principle quoted above is a good thing that we can agree. Now that include guards were added to every and all of the headers inside of our project this changeset does not increase compile time, at least on my machine.
Diffstat (limited to 'include/ruby/backward')
-rw-r--r--include/ruby/backward/2/gcc_version_since.h1
-rw-r--r--include/ruby/backward/2/long_long.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/include/ruby/backward/2/gcc_version_since.h b/include/ruby/backward/2/gcc_version_since.h
index 553b982147..03f767aedb 100644
--- a/include/ruby/backward/2/gcc_version_since.h
+++ b/include/ruby/backward/2/gcc_version_since.h
@@ -20,6 +20,7 @@
* extension libraries. They could be written in C++98.
* @brief Defines old #GCC_VERSION_SINCE
*/
+#include "ruby/3/compiler_since.h"
#ifndef GCC_VERSION_SINCE
#define GCC_VERSION_SINCE(x, y, z) RUBY3_COMPILER_SINCE(GCC, (x), (y), (z))
diff --git a/include/ruby/backward/2/long_long.h b/include/ruby/backward/2/long_long.h
index 2a9b9e7f40..3b2261b71f 100644
--- a/include/ruby/backward/2/long_long.h
+++ b/include/ruby/backward/2/long_long.h
@@ -26,6 +26,8 @@
* compatibility only.
*/
#include "ruby/3/config.h"
+#include "ruby/3/has/warning.h"
+#include "ruby/3/warning_push.h"
#if RUBY3_HAS_WARNING("-Wc++11-long-long")
# define HAVE_TRUE_LONG_LONG 1