From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30249 invoked by alias); 14 Jun 2013 21:27:37 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 30205 invoked by uid 48); 14 Jun 2013 21:27:34 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/52347] -Wno-tabs -Wall -Wno-tabs still warns about tabs Date: Fri, 14 Jun 2013 21:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.7.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00758.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D52347 --- Comment #3 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- (In reply to Simon Richter from comment #2) > In 4.8, this causes build failures for me: >=20 > $ g++ -g -Wall -W -Werror -Wno-unused -I. -o stage1/tree_bison_lex.o -c > tree_bison_lex.cpp > tree_bison_lex.cpp:1744:13: error: unused parameter 'yyscanner' > [-Werror=3Dunused-parameter] Could you attach a self-contained preprocessed testcase? See http://gcc.gnu.org/bugs/ >>From gcc-bugs-return-424380-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Jun 14 21:41:19 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 5479 invoked by alias); 14 Jun 2013 21:41:19 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 5459 invoked by uid 48); 14 Jun 2013 21:41:15 -0000 From: "gdjss2728 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/57619] New: std::unordered_map and std::unordered_multimap::insert invoking std::pair move constructor Date: Fri, 14 Jun 2013 21:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gdjss2728 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00759.txt.bz2 Content-length: 1217 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57619 Bug ID: 57619 Summary: std::unordered_map and std::unordered_multimap::insert invoking std::pair move constructor Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: gdjss2728 at gmail dot com The following code is invoking the std::pair move constructor: int main () { std::unordered_map mymap; std::unordered_multimap mymultimap; std::pair mypair{std::string("key"), std::string("value")}; mymultimap.insert(mypair); // std::pair move constructor invoked here mymap.insert(mypair); // strings already moved out! } This seems related to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53657. As far as I can tell, overload resolution is choosing `insert(_Pair&& __x)` over `insert(const value_type& __x)`. Since this is an lvalue, the latter should be chosen. This happens for std::unordered_map::insert and std::unordered_multimap::insert.