From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113096 invoked by alias); 27 Apr 2015 12:00:43 -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 113069 invoked by uid 48); 27 Apr 2015 12:00:39 -0000 From: "bastian.beischer@rwth-aachen.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/65899] New: std::basic_stringbuf member __xfer_bufptrs should be explicitly declared private Date: Mon, 27 Apr 2015 12:00: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: 5.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: trivial X-Bugzilla-Who: bastian.beischer@rwth-aachen.de 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: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg02270.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D65899 Bug ID: 65899 Summary: std::basic_stringbuf member __xfer_bufptrs should be explicitly declared private Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: trivial Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: bastian.beischer@rwth-aachen.de Target Milestone: --- I'm trying to compile code with GCC 5.1.0 which makes use of the good ole: #define private public hack (for some reason). I know, I know, but it's not my code and I'd like i= t to compile out of the box... Now the issue is this: In GCC 5.1.0's version of the sstream header one fin= ds the following: template class basic_stringbuf : public basic_streambuf<_CharT, _Traits> { struct __xfer_bufptrs; public: // Types: typedef _CharT char_type; typedef _Traits traits_type; [...] private: [...] struct __xfer_bufptrs { [...] The problem is that the member __xfer_bufptrs is implicitly private when it= 's declared but then later it's expliclity marked private. Then, due to the #define private public, the second one turns public but the first one does not and there's a conflict leading to this error: /usr/include/c++/5.1.0/sstream:335:7: error: =E2=80=98struct std::basic_stringbuf<_CharT, _Traits, _Alloc>::__xfer_bufptrs=E2=80=99 rede= clared with different access struct __xfer_bufptrs ^ Any chance to mark the first instance private explicitly? >>From gcc-bugs-return-484719-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Apr 27 12:10:21 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 8251 invoked by alias); 27 Apr 2015 12:10:21 -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 8204 invoked by uid 48); 27 Apr 2015 12:10:17 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65886] [5/6 Regression] Copy reloc in PIE incompatible with DSO created by -Wl,-Bsymbolic Date: Mon, 27 Apr 2015 12:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.1.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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-04/txt/msg02271.txt.bz2 Content-length: 677 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886 --- Comment #13 from H.J. Lu --- (In reply to Jakub Jelinek from comment #12) > First of all, why is this filed as a GCC bug? And what is PIE specific on > the issue? I mean, if -Bsymbolic doesn't cope well with like copy > relocations, then > the testcase doesn't work on most targets when the binary is normal > executable rather than PIE. It is true that the testcase doesn't work with normal executable. I don't believe GCC is wrong to generate copy relocation in PIE. It is only a GCC bug that PIE worked before, it doesn't work now and there is no command option to make PIE to work.