public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Remove libsupc++ makefile targets setting -std=gnu++11 or -std=gnu++14
@ 2017-06-02 11:49 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2017-06-02 11:49 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 844 bytes --]

Jakub pointed out that the libsupc++/Makefile has targets with
explicit -std=gnu++11 options, which date from before the default
changed to -std=gnu++14. We no longer need to override the default to
be able to compile the C++11 components. This removes those makefile
targets, as well using pragmas in the sources to avoid
-Wsized-deallocation warnings in the relevant files).

All the files using the default options that used to compile as
-std=gnu++98 or -std=gnu++11 are fine to be compiled as -std=gnu++14
using the default setting.

	* libsupc++/Makefile.am: Remove custom targets for files that need to
	be compiled as C++11 or C++14.
	* libsupc++/Makefile.in: Regenerate.
	* libsupc++/del_ops.cc: Use pragma to disable -Wsized-deallocation
	warnings.
	* libsupc++/del_opvs.cc: Likewise.

Tested powerpc64le-linux, committed to trunk.



[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 3915 bytes --]

commit 279bf8f19f7e3a50dfcc4b2958f6748c46833a91
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Jun 2 10:57:28 2017 +0100

    Remove libsupc++ makefile targets setting -std=gnu++11 or -std=gnu++14
    
    	* libsupc++/Makefile.am: Remove custom targets for files that need to
    	be compiled as C++11 or C++14.
    	* libsupc++/Makefile.in: Regenerate.
    	* libsupc++/del_ops.cc: Use pragma to disable -Wsized-deallocation
    	warnings.
    	* libsupc++/del_opvs.cc: Likewise.

diff --git a/libstdc++-v3/libsupc++/Makefile.am b/libstdc++-v3/libsupc++/Makefile.am
index 1b36187..c7fdff1 100644
--- a/libstdc++-v3/libsupc++/Makefile.am
+++ b/libstdc++-v3/libsupc++/Makefile.am
@@ -128,77 +128,6 @@ cp-demangle.o: cp-demangle.c
 	$(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
 
 
-# Use special rules for the C++11 sources so that the proper flags are passed.
-bad_array_length.lo: bad_array_length.cc
-	$(LTCXXCOMPILE) -std=gnu++11 -c $<
-bad_array_length.o: bad_array_length.cc
-	$(CXXCOMPILE) -std=gnu++11 -c $<
-
-bad_array_new.lo: bad_array_new.cc
-	$(LTCXXCOMPILE) -std=gnu++11 -c $<
-bad_array_new.o: bad_array_new.cc
-	$(CXXCOMPILE) -std=gnu++11 -c $<
-
-eh_aux_runtime.lo: eh_aux_runtime.cc
-	$(LTCXXCOMPILE) -std=gnu++11 -c $<
-eh_aux_runtime.o: eh_aux_runtime.cc
-	$(CXXCOMPILE) -std=gnu++11 -c $<
-
-eh_ptr.lo: eh_ptr.cc
-	$(LTCXXCOMPILE) -std=gnu++11 -c $<
-eh_ptr.o: eh_ptr.cc
-	$(CXXCOMPILE) -std=gnu++11 -c $<
-
-eh_terminate.lo: eh_terminate.cc
-	$(LTCXXCOMPILE) -std=gnu++11 -c $<
-eh_terminate.o: eh_terminate.cc
-	$(CXXCOMPILE) -std=gnu++11 -c $<
-
-eh_throw.lo: eh_throw.cc
-	$(LTCXXCOMPILE) -std=gnu++11 -c $<
-eh_throw.o: eh_throw.cc
-	$(CXXCOMPILE) -std=gnu++11 -c $<
-
-guard.lo: guard.cc
-	$(LTCXXCOMPILE) -std=gnu++11 -c $<
-guard.o: guard.cc
-	$(CXXCOMPILE) -std=gnu++11 -c $<
-
-atexit_thread.lo: atexit_thread.cc
-	$(LTCXXCOMPILE) -std=gnu++11 -c $<
-atexit_thread.o: atexit_thread.cc
-	$(CXXCOMPILE) -std=gnu++11 -c $<
-
-nested_exception.lo: nested_exception.cc
-	$(LTCXXCOMPILE) -std=gnu++11 -c $<
-nested_exception.o: nested_exception.cc
-	$(CXXCOMPILE) -std=gnu++11 -c $<
-
-new_handler.lo: new_handler.cc
-	$(LTCXXCOMPILE) -std=gnu++11 -c $<
-new_handler.o: new_handler.cc
-	$(CXXCOMPILE) -std=gnu++11 -c $<
-
-new_op.lo: new_op.cc
-	$(LTCXXCOMPILE) -std=gnu++11 -c $<
-new_op.o: new_op.cc
-	$(CXXCOMPILE) -std=gnu++11 -c $<
-
-new_opnt.lo: new_opnt.cc
-	$(LTCXXCOMPILE) -std=gnu++11 -c $<
-new_opnt.o: new_opnt.cc
-	$(CXXCOMPILE) -std=gnu++11 -c $<
-
-# Use special rules for the C++14 sources so that the proper flags are passed.
-del_ops.lo: del_ops.cc
-	$(LTCXXCOMPILE) -std=gnu++14 -Wno-sized-deallocation -c $<
-del_ops.o: del_ops.cc
-	$(CXXCOMPILE) -std=gnu++14 -Wno-sized-deallocation -c $<
-del_opvs.lo: del_opvs.cc
-	$(LTCXXCOMPILE) -std=gnu++14 -Wno-sized-deallocation -c $<
-del_opvs.o: del_opvs.cc
-	$(CXXCOMPILE) -std=gnu++14 -Wno-sized-deallocation -c $<
-
 # Use special rules for the C++17 sources so that the proper flags are passed.
 new_opa.lo: new_opa.cc
 	$(LTCXXCOMPILE) -std=gnu++1z -c $<
diff --git a/libstdc++-v3/libsupc++/del_ops.cc b/libstdc++-v3/libsupc++/del_ops.cc
index 5978eb9..8062724 100644
--- a/libstdc++-v3/libsupc++/del_ops.cc
+++ b/libstdc++-v3/libsupc++/del_ops.cc
@@ -23,6 +23,7 @@
 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 // <http://www.gnu.org/licenses/>.
 
+#pragma GCC diagnostic ignored "-Wsized-deallocation"
 #include <bits/c++config.h>
 #include "new"
 
diff --git a/libstdc++-v3/libsupc++/del_opvs.cc b/libstdc++-v3/libsupc++/del_opvs.cc
index a631157..78b1189 100644
--- a/libstdc++-v3/libsupc++/del_opvs.cc
+++ b/libstdc++-v3/libsupc++/del_opvs.cc
@@ -23,6 +23,7 @@
 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 // <http://www.gnu.org/licenses/>.
 
+#pragma GCC diagnostic ignored "-Wsized-deallocation"
 #include <bits/c++config.h>
 #include "new"
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-02 11:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-02 11:49 [PATCH] Remove libsupc++ makefile targets setting -std=gnu++11 or -std=gnu++14 Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).