From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53517 invoked by alias); 5 Jul 2015 20:39:41 -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 53499 invoked by uid 48); 5 Jul 2015 20:39:37 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/66771] New: [5 Regression] -std=c++11 doesn't work Date: Sun, 05 Jul 2015 20:39:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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 target_milestone 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: 2015-07/txt/msg00379.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66771 Bug ID: 66771 Summary: [5 Regression] -std=c++11 doesn't work Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hjl.tools at gmail dot com Target Milestone: --- On Linux/x86-64, GCC 5 failed to compile 450.soplex in SPEC CPU 2006: [hjl@gnu-ivb-1 build_base_lnx32e-gcc.0000]$ g++ -c -o mpsinput.o -DSPEC_CPU -DNDEBUG -O2 -ffast-math -DSPEC_CPU_LP64 -fno-strict-aliasing mpsinput.cc -std=c++11 mpsinput.cc: In member function \u2018bool soplex::MPSInput::readLine()\u2019: mpsinput.cc:75:52: error: no match for \u2018operator==\u2019 (operand types are \u2018std::basic_istream::__istream_type {aka std::basic_istream}\u2019 and \u2018int\u2019) if (m_input.getline(m_buf, sizeof(m_buf)) == 0) ^ mpsinput.cc:75:52: note: candidate: operator==(int, int) mpsinput.cc:75:52: note: no known conversion for argument 1 from \u2018std::basic_istream::__istream_type {aka std::basic_istream}\u2019 to \u2018int\u2019 In file included from /usr/include/c++/5.1.1/bits/locale_conv.h:41:0, from /usr/include/c++/5.1.1/locale:43, from /usr/include/c++/5.1.1/iomanip:43, from spxlp.h:28, from mpsinput.h:25, from mpsinput.cc:29: /usr/include/c++/5.1.1/bits/unique_ptr.h:635:5: note: candidate: template bool std::operator==(std::nullptr_t, const std::unique_ptr<_Tp, _Dp>&) operator==(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept ^ /usr/include/c++/5.1.1/bits/unique_ptr.h:635:5: note: template argument deduction/substitution failed: mpsinput.cc:75:29: note: cannot convert \u2018(&((soplex::MPSInput*)this)->soplex::MPSInput::m_input)->std::basic_istream<_CharT, _Traits>::getline >(((char*)(&((soplex::MPSInput*)this)->soplex::MPSInput::m_buf)), ((std::streamsize)sizeof (((soplex::MPSInput*)this)->soplex::MPSInput::m_buf)))\u2019 (type \u2018std::basic_istream::__istream_type {aka std::basic_istream}\u2019) to type \u2018std::nullptr_t\u2019 if (m_input.getline(m_buf, sizeof(m_buf)) == 0) ^ In file included from /usr/include/c++/5.1.1/bits/locale_conv.h:41:0, from /usr/include/c++/5.1.1/locale:43, from /usr/include/c++/5.1.1/iomanip:43, from spxlp.h:28, from mpsinput.h:25, from mpsinput.cc:29: /usr/include/c++/5.1.1/bits/unique_ptr.h:630:5: note: candidate: template bool std::operator==(const std::unique_ptr<_Tp, _Dp>&, std::nullptr_t) operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept ^ /usr/include/c++/5.1.1/bits/unique_ptr.h:630:5: note: template argument deduction/substitution failed: mpsinput.cc:75:55: note: \u2018std::basic_istream::__istream_type {aka std::basic_istream}\u2019 is not derived from \u2018const std::unique_ptr<_Tp, _Dp>\u2019 if (m_input.getline(m_buf, sizeof(m_buf)) == 0) ^ In file included from /usr/include/c++/5.1.1/bits/locale_conv.h:41:0, from /usr/include/c++/5.1.1/locale:43, from /usr/include/c++/5.1.1/iomanip:43, from spxlp.h:28, from mpsinput.h:25, from mpsinput.cc:29: /usr/include/c++/5.1.1/bits/unique_ptr.h:624:5: note: candidate: template bool std::operator==(const std::unique_ptr<_Tp, _Dp>&, const std::unique_ptr<_Up, _Ep>&) operator==(const unique_ptr<_Tp, _Dp>& __x, ... GCC 4.9 and GCC 6 are OK.