From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8709 invoked by alias); 5 Nov 2013 11:34:07 -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 6810 invoked by uid 48); 5 Nov 2013 11:32:05 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58999] sizeof ...(T) is very slow than clang Date: Tue, 05 Nov 2013 11:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW 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_status cf_reconfirmed_on everconfirmed 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-11/txt/msg00318.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D58999 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-11-05 Ever confirmed|0 |1 --- Comment #3 from Jonathan Wakely --- (In reply to V=C3=A1clav Zeman from comment #2) > You should probably add the complete test case as an attachment. There's no need, the testcase is small and self-contained and already prese= nt. However, khurshid, you haven't said what version of GCC you are using or ho= w it was configured. >>From gcc-bugs-return-433542-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Nov 05 11:53:52 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 23337 invoked by alias); 5 Nov 2013 11:53:51 -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 21866 invoked by uid 48); 5 Nov 2013 11:51:49 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/58993] failure to access pointer to protected member method in base from derived class specialization Date: Tue, 05 Nov 2013 11:53:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.7.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg00319.txt.bz2 Content-length: 662 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58993 --- Comment #1 from Jonathan Wakely --- (In reply to Chris Studholme from comment #0) > Sample code: > > class base { > protected: > typedef void (base::*foo_type)() const; > void foo() const {} > }; > > template > struct bar : public base { > foo_type test() { > return &base::foo; // OK The bug is here, this should be an error too (but G++ has lots of bugs with access checking in templates) The name foo is a protected member of base, to access it you have to do it via the derived class, i.e. you should do: return &bar::foo;