This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix invalid attributes in libstdc++


On 03/02/15 10:37 +0000, Iain Sandoe wrote:
Hi Jonathan,

On 1 Feb 2015, at 15:10, Jonathan Wakely wrote:

On 01/02/15 15:08 +0000, Jonathan Wakely wrote:
I failed to CC gcc-patches on this patch ...

On 29/01/15 13:02 +0000, Jonathan Wakely wrote:
Jakub pointed out that we have some attributes that don't use the
reserved namespace, e.g. __attribute__ ((always_inline)).

This is a 4.9/5 regression and the fix was pre-approved by Jakub so
I've committed it to trunk.

When we're back in stage1 I'll fix the TODO comments in the new tests
(see PR64857) and will also rename testsuite/17_intro/headers/c++200x
to .../c++2011.


The new test fails on darwin (PR64883) and --enable-threads=single
targets (PR64885).

This is a workaround for 64883. Tested x86_64-linux, committed to
trunk.
<patch.txt>

the following additional tweaks provide further work-arounds.
... checked on darwin12 and darwin14.

OK for trunk - thanks.

I have a fixincludes patch for next stage #1.
Iain


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 76a935e..6fc362a 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
@@ -26,11 +26,11 @@
// darwin headers use these, see PR 64883
# define deprecated 1
# define noreturn 1
+# define visibility 1
#endif
#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>
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
index c7ec27a..0726e3f 100644
--- a/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc
+++ b/libstdc++-v3/testsuite/17_intro/headers/c++200x/all_attributes.cc
@@ -22,11 +22,14 @@
// Don't test 'const' and 'noreturn' because they are reserved anyway.
#define abi_tag 1
#define always_inline 1
-#define deprecated 1
+#ifndef __APPLE__
+// darwin headers use these, see PR 64883
+# define visibility 1
+# define deprecated 1
+#endif
#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>
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 533a6f1..06bcb8e 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
@@ -22,11 +22,14 @@
// Don't test 'const' and 'noreturn' because they are reserved anyway.
#define abi_tag 1
#define always_inline 1
-#define deprecated 1
+#ifndef __APPLE__
+// darwin headers use these, see PR 64883
+# define deprecated 1
+# define visibility 1
+#endif
#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>





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]