+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
#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)
#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)
#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 {
# endif
# if _GLIBCXX_USE_CXX11_ABI
- inline namespace __cxx11 __attribute__((abi_tag)) { }
+ inline namespace __cxx11 __attribute__((__abi_tag__)) { }
# endif
}
empty_entry_status,
valid_entry_status,
erased_entry_status
- } __attribute__ ((packed));
+ } __attribute__ ((__packed__));
struct entry : public traits_base::stored_data_type
{
~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);
}
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);
}
--- /dev/null
+// 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()
+{
+}
--- /dev/null
+// 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()
+{
+}
--- /dev/null
+// 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()
+{
+}