summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog13
-rw-r--r--libstdc++-v3/include/bits/atomic_base.h2
-rw-r--r--libstdc++-v3/include/bits/atomic_futex.h2
-rw-r--r--libstdc++-v3/include/bits/c++config4
-rw-r--r--libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp2
-rw-r--r--libstdc++-v3/include/std/shared_mutex4
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc38
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc38
-rw-r--r--libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc38
9 files changed, 134 insertions, 7 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 5e1aeaeeb52..ea7b5d57923 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,16 @@
+2015-01-29 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/atomic_base.h: Use __always_inline__ instead of
+ always_inline.
+ * include/bits/atomic_futex.h: Likewise.
+ * include/bits/c++config: Use __abi_tag__ instead of abi_tag.
+ * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Use
+ __packed__ instead of packed.
+ * include/std/shared_mutex: Use __unused__ instead of unused.
+ * testsuite/17_intro/headers/c++1998/all_attributes.cc: New.
+ * testsuite/17_intro/headers/c++200x/all_attributes.cc: New.
+ * testsuite/17_intro/headers/c++2014/all_attributes.cc: New.
+
2015-01-27 Caroline Tice <cmtice@google.com>
Committing VTV Cywin/Ming patch for Patrick Wollgast
diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h
index 5e610f1c3ee..fe6524f41b7 100644
--- a/libstdc++-v3/include/bits/atomic_base.h
+++ b/libstdc++-v3/include/bits/atomic_base.h
@@ -37,7 +37,7 @@
#include <bits/atomic_lockfree_defines.h>
#ifndef _GLIBCXX_ALWAYS_INLINE
-#define _GLIBCXX_ALWAYS_INLINE inline __attribute__((always_inline))
+#define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__))
#endif
namespace std _GLIBCXX_VISIBILITY(default)
diff --git a/libstdc++-v3/include/bits/atomic_futex.h b/libstdc++-v3/include/bits/atomic_futex.h
index 51b9c7e5737..ca3260d4ee2 100644
--- a/libstdc++-v3/include/bits/atomic_futex.h
+++ b/libstdc++-v3/include/bits/atomic_futex.h
@@ -41,7 +41,7 @@
#endif
#ifndef _GLIBCXX_ALWAYS_INLINE
-#define _GLIBCXX_ALWAYS_INLINE inline __attribute__((always_inline))
+#define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__))
#endif
namespace std _GLIBCXX_VISIBILITY(default)
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 721778a1997..46ffa1f5d0a 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -215,7 +215,7 @@ namespace std
#if _GLIBCXX_USE_CXX11_ABI
namespace std
{
- inline namespace __cxx11 __attribute__((abi_tag)) { }
+ inline namespace __cxx11 __attribute__((__abi_tag__)) { }
}
# define _GLIBCXX_NAMESPACE_CXX11 __cxx11::
# define _GLIBCXX_BEGIN_NAMESPACE_CXX11 namespace __cxx11 {
@@ -290,7 +290,7 @@ namespace std
# endif
# if _GLIBCXX_USE_CXX11_ABI
- inline namespace __cxx11 __attribute__((abi_tag)) { }
+ inline namespace __cxx11 __attribute__((__abi_tag__)) { }
# endif
}
diff --git a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp
index 0b71817c41d..a402bef3a61 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp
@@ -162,7 +162,7 @@ namespace __gnu_pbds
empty_entry_status,
valid_entry_status,
erased_entry_status
- } __attribute__ ((packed));
+ } __attribute__ ((__packed__));
struct entry : public traits_base::stored_data_type
{
diff --git a/libstdc++-v3/include/std/shared_mutex b/libstdc++-v3/include/std/shared_mutex
index 47cfc6433d9..5dcc295746b 100644
--- a/libstdc++-v3/include/std/shared_mutex
+++ b/libstdc++-v3/include/std/shared_mutex
@@ -78,7 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
~shared_timed_mutex()
{
- int __ret __attribute((unused)) = pthread_rwlock_destroy(&_M_rwlock);
+ int __ret __attribute((__unused__)) = pthread_rwlock_destroy(&_M_rwlock);
// Errors not handled: EBUSY, EINVAL
_GLIBCXX_DEBUG_ASSERT(__ret == 0);
}
@@ -155,7 +155,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
void
unlock()
{
- int __ret __attribute((unused)) = pthread_rwlock_unlock(&_M_rwlock);
+ int __ret __attribute((__unused__)) = pthread_rwlock_unlock(&_M_rwlock);
// Errors not handled: EPERM, EBUSY, EINVAL
_GLIBCXX_DEBUG_ASSERT(__ret == 0);
}
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
new file mode 100644
index 00000000000..c7ed8aea01c
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++98" }
+// { dg-do compile }
+
+// Ensure the library only uses the __name__ form for attributes.
+// Don't test 'const' because it is reserved anyway.
+#define abi_tag 1
+#define always_inline 1
+#define deprecated 1
+#define noreturn 1
+#define packed 1
+#define pure 1
+#define unused 1
+#define visibility 1
+
+#include <bits/stdc++.h> // TODO: this is missing from <bits/extc++.h>
+#include <bits/extc++.h>
+
+int
+main()
+{
+}
diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc
new file mode 100644
index 00000000000..c7ec27ae550
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++11" }
+// { dg-do compile }
+
+// 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 always_inline 1
+#define deprecated 1
+#define packed 1
+#define pure 1
+#define unused 1
+#define visibility 1
+
+#include <bits/stdc++.h> // TODO: this is missing from <bits/extc++.h>
+#include <codecvt> // TODO: this is missing from <bits/stdc++.h>
+#include <bits/extc++.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
new file mode 100644
index 00000000000..533a6f14e9a
--- /dev/null
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++2014/all_attributes.cc
@@ -0,0 +1,38 @@
+// Copyright (C) 2015 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-std=gnu++14" }
+// { dg-do compile }
+
+// 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 always_inline 1
+#define deprecated 1
+#define packed 1
+#define pure 1
+#define unused 1
+#define visibility 1
+
+#include <bits/stdc++.h> // TODO: this is missing from <bits/extc++.h>
+#include <shared_mutex> // TODO: this is missing from <bits/stdc++.h>
+#include <bits/extc++.h>
+
+int
+main()
+{
+}