From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9227 invoked by alias); 6 Jun 2013 11:53:03 -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 9129 invoked by uid 48); 6 Jun 2013 11:52:57 -0000 From: "mitchnull+gcc at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57543] New: decltype needs eplicity 'this' pointer in member function declaration of template class with trailing return type Date: Thu, 06 Jun 2013 11:53: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: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mitchnull+gcc 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 attachments.created 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: 2013-06/txt/msg00285.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D57543 Bug ID: 57543 Summary: decltype needs eplicity 'this' pointer in member function declaration of template class with trailing return type Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mitchnull+gcc at gmail dot com Created attachment 30268 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=3D30268&action=3Dedit decltype-implicit-this.cpp When using trailing return-type for member functions of a template class, t= he 'this' pointer must be explicitly mentioned. This should not be necessary (= The implicit 'this' works with a non-template class). Example: emplate struct DecltypeConstThis { T f() const { return T{}; } auto g() -> decltype(this->f()) { return this->f(); } auto h() const -> decltype(f()) { return f(); } // this should work t= he same as g() above (with implicit 'this') }; struct Working { int f() const { return 0; } auto h() const -> decltype(f()) { return 0; } }; int main() { Working w; w.h(); DecltypeConstThis d; d.g(); d.h(); return 0; } compiler output: [mitch@deneb src]$ g++ -std=3Dc++11 -o decltype-implicit-this decltype-implicit-this.cpp=20 decltype-implicit-this.cpp: In instantiation of =E2=80=98struct DecltypeConstThis=E2=80=99: decltype-implicit-this.cpp:22:28: required from here decltype-implicit-this.cpp:7:36: error: cannot call member function =E2=80= =98T DecltypeConstThis::f() const [with T =3D int]=E2=80=99 without object auto h() const -> decltype(f()) { return f(); } // this should work = the same as g() above (with implicit 'this') ^ decltype-implicit-this.cpp: In function =E2=80=98int main()=E2=80=99: decltype-implicit-this.cpp:24:7: error: =E2=80=98struct DecltypeConstThis=E2=80=99 has no member named =E2=80=98h=E2=80=99 d.h(); ^ ps: possibly related to bug #54359 >>From gcc-bugs-return-423907-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jun 06 12:43:36 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 15543 invoked by alias); 6 Jun 2013 12:43:36 -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 15502 invoked by uid 48); 6 Jun 2013 12:43:29 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/54370] [4.7 Regression] error: non-trivial conversion in unary operation Date: Thu, 06 Jun 2013 12:43: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: ice-on-valid-code, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus 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: 4.7.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords cc target_milestone short_desc 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-06/txt/msg00286.txt.bz2 Content-length: 862 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54370 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code, patch CC| |burnus at gcc dot gnu.org Target Milestone|--- |4.7.4 Summary|error: non-trivial |[4.7 Regression] error: |conversion in unary |non-trivial conversion in |operation |unary operation --- Comment #4 from Tobias Burnus --- The bug was solved in August 2012 on the GCC 4.8 trunk; however, as it is a regression, it should have been backported to the GCC 4.7 branch.