public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [patch] Fix warning during libstdc++ build
Date: Wed, 07 Jan 2015 22:49:00 -0000	[thread overview]
Message-ID: <20150107224927.GD3360@redhat.com> (raw)

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

This fixes a -Wc++14-compat warning in the new libsupc++/del_ops.cc
file that defines the C++14 sized deallocation function.

Tested x86_64-linux, committed to trunk.


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

commit 9236910f087450f43ce80d696737e9ecd96bb1ef
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jan 6 17:30:21 2015 +0000

    	* libsupc++/Makefile.am: Compile del_ops.cc as C++14.
    	* libsupc++/Makefile.in: Regenerate.

diff --git a/libstdc++-v3/libsupc++/Makefile.am b/libstdc++-v3/libsupc++/Makefile.am
index 06e56b6..aace1a6 100644
--- a/libstdc++-v3/libsupc++/Makefile.am
+++ b/libstdc++-v3/libsupc++/Makefile.am
@@ -177,6 +177,12 @@ new_opnt.lo: new_opnt.cc
 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 $<
+
 # AM_CXXFLAGS needs to be in each subdirectory so that it can be
 # modified in a per-library or per-sub-library way.  Need to manually
 # set this option because CONFIG_CXXFLAGS has to be after
diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in
index 9a1d725..50fee54 100644
--- a/libstdc++-v3/libsupc++/Makefile.in
+++ b/libstdc++-v3/libsupc++/Makefile.in
@@ -870,6 +870,12 @@ new_opnt.lo: new_opnt.cc
 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 $<
+
 install-stdHEADERS: $(std_HEADERS)
 	@$(NORMAL_INSTALL)
 	$(mkinstalldirs) $(DESTDIR)$(stddir)

             reply	other threads:[~2015-01-07 22:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-07 22:49 Jonathan Wakely [this message]
2015-01-28 16:05 ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150107224927.GD3360@redhat.com \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).