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]

[v3] mutex vs. cstdatomic


There appears to be an include ordering issue on darwin:

No joy:
#include "gstdint.h"
#include <cstdatomic>
#include <mutex>

OK:
#include "gstdint.h"
#include <mutex>
#include <cstdatomic>

Adjusting this allows bootstrap on darwin again. Sorry about this: I
thought I had tested this platform specifically before check-in, but
apparently not with the correct sources. 

tested x86_64/linux
tested darwin9.5.0/x86

-benjamin

2008-12-12  Benjamin Kosnik  <bkoz@redhat.com>

	* src/Makefile.am: Remove -x c++ for atomic build rules.
	* src/Makefile.in: Regenerate.
	* src/atomic.cc: Move mutex include before cstdatomic.


Index: src/atomic.cc
===================================================================
--- src/atomic.cc	(revision 142737)
+++ src/atomic.cc	(working copy)
@@ -29,8 +29,8 @@
 // the GNU General Public License.
 
 #include "gstdint.h"
+#include <mutex>
 #include <cstdatomic>
-#include <mutex>
 
 #define LOGSIZE 4
 
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 142737)
+++ src/Makefile.am	(working copy)
@@ -274,9 +274,9 @@
 	$(CXXCOMPILE) -std=gnu++0x -c $<
 
 atomic.lo: atomic.cc
-	$(LTCXXCOMPILE) -x c++ -std=gnu++0x -c $<
+	$(LTCXXCOMPILE) -std=gnu++0x -c $<
 atomic.o: atomic.cc
-	$(CXXCOMPILE) -x c++ -std=gnu++0x -c $<
+	$(CXXCOMPILE) -std=gnu++0x -c $<
 
 string-inst.lo: string-inst.cc
 	$(LTCXXCOMPILE) -std=gnu++0x -c $<

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