aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-08-18 15:37:14 +0100
committerJonathan Wakely <jwakely@redhat.com>2020-08-18 15:37:33 +0100
commit6c1a58b7fbdaa8ac00957fccfb379af163309311 (patch)
treec67a9fc94502782b4cd979e75515a5b36fef7db8
parentd850dec9b7bd02ef925def138894402038cca78d (diff)
downloadgcc-6c1a58b7fbdaa8ac00957fccfb379af163309311.zip
gcc-6c1a58b7fbdaa8ac00957fccfb379af163309311.tar.gz
gcc-6c1a58b7fbdaa8ac00957fccfb379af163309311.tar.bz2
libstdc++: Add "cold" to tests for reserved attribute names
libstdc++-v3/ChangeLog: * testsuite/17_intro/headers/c++1998/all_attributes.cc: Check "cold" isn't used in the library. Also check <cxxabi.h>. * testsuite/17_intro/headers/c++2011/all_attributes.cc: Likewise. * testsuite/17_intro/headers/c++2014/all_attributes.cc: Likewise. * testsuite/17_intro/headers/c++2017/all_attributes.cc: Likewise. * testsuite/17_intro/headers/c++2020/all_attributes.cc: Likewise.
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc2
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc2
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc2
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc2
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc2
5 files changed, 10 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
index 73a20e3..dd28429 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
@@ -21,6 +21,7 @@
// Ensure the library only uses the __name__ form for attributes.
// Don't test 'const' because it is reserved anyway.
#define abi_tag 1
+#define cold 1
#ifndef __APPLE__
// darwin headers use these, see PR 64883
# define always_inline 1
@@ -36,6 +37,7 @@
#endif
#include <bits/extc++.h>
+#include <cxxabi.h>
int
main()
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
index c0a79e0..db00a33 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2011/all_attributes.cc
@@ -21,6 +21,7 @@
// Ensure the library only uses the __name__ form for attributes.
// Don't test 'const' and 'noreturn' because they are reserved anyway.
#define abi_tag 1
+#define cold 1
#ifndef __APPLE__
// darwin headers use these, see PR 64883
# define always_inline 1
@@ -35,6 +36,7 @@
#endif
#include <bits/extc++.h>
+#include <cxxabi.h>
int
main()
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
index 1e3ba08..3322c2c 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
@@ -21,6 +21,7 @@
// Ensure the library only uses the __name__ form for attributes.
// Don't test 'const' and 'noreturn' because they are reserved anyway.
#define abi_tag 1
+#define cold 1
#ifndef __APPLE__
// darwin headers use these, see PR 64883
# define always_inline 1
@@ -35,6 +36,7 @@
#endif
#include <bits/extc++.h>
+#include <cxxabi.h>
int
main()
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
index 035526e..a0d6773 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2017/all_attributes.cc
@@ -21,6 +21,7 @@
// Ensure the library only uses the __name__ form for attributes.
// Don't test 'const' and 'noreturn' because they are reserved anyway.
#define abi_tag 1
+#define cold 1
#ifndef __APPLE__
// darwin headers use these, see PR 64883
# define always_inline 1
@@ -34,6 +35,7 @@
#endif
#include <bits/extc++.h>
+#include <cxxabi.h>
int
main()
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc
index 6f5ea46..da8f0e4 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2020/all_attributes.cc
@@ -21,6 +21,7 @@
// Ensure the library only uses the __name__ form for attributes.
// Don't test 'const' and 'noreturn' because they are reserved anyway.
#define abi_tag 1
+#define cold 1
#ifndef __APPLE__
// darwin headers use these, see PR 64883
# define always_inline 1
@@ -34,6 +35,7 @@
#endif
#include <bits/extc++.h>
+#include <cxxabi.h>
int
main()