public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47172] New: [C++0x] cannot call member function without object
@ 2011-01-04 21:42 marc.glisse at normalesup dot org
2011-01-04 22:28 ` [Bug c++/47172] [4.6 Regression] " redi at gcc dot gnu.org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-01-04 21:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47172
Summary: [C++0x] cannot call member function without object
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: marc.glisse@normalesup.org
The following code fails to compile with -std=c++0x, but compiles with c++98 or
if I change the prototype of f to make it return void. It doesn't look like PR
46731.
struct A
{
int f() const;
};
template <class T>
struct B : A { };
template <class T>
struct C : B<T>
{
void g();
};
template <class T>
void C<T>::g()
{
A::f();
}
bug.cpp:18:11: error: cannot call member function 'int A::f() const' without
object
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/47172] [4.6 Regression] [C++0x] cannot call member function without object
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
@ 2011-01-04 22:28 ` redi at gcc dot gnu.org
2011-01-04 22:50 ` hjl.tools at gmail dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: redi at gcc dot gnu.org @ 2011-01-04 22:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47172
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.01.04 22:28:48
Known to work| |4.4.5, 4.5.2
Summary|[C++0x] cannot call member |[4.6 Regression] [C++0x]
|function without object |cannot call member function
| |without object
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-01-04 22:28:48 UTC ---
confirmed as a regression in 4.6
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/47172] [4.6 Regression] [C++0x] cannot call member function without object
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
2011-01-04 22:28 ` [Bug c++/47172] [4.6 Regression] " redi at gcc dot gnu.org
@ 2011-01-04 22:50 ` hjl.tools at gmail dot com
2011-01-19 20:54 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-04 22:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47172
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
Target Milestone|--- |4.6.0
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-04 22:49:51 UTC ---
It is caused by revision 166167:
http://gcc.gnu.org/ml/gcc-cvs/2010-11/msg00053.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/47172] [4.6 Regression] [C++0x] cannot call member function without object
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
2011-01-04 22:28 ` [Bug c++/47172] [4.6 Regression] " redi at gcc dot gnu.org
2011-01-04 22:50 ` hjl.tools at gmail dot com
@ 2011-01-19 20:54 ` jakub at gcc dot gnu.org
2011-02-07 20:16 ` dodji at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-19 20:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47172
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
CC| |jakub at gcc dot gnu.org
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/47172] [4.6 Regression] [C++0x] cannot call member function without object
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
` (2 preceding siblings ...)
2011-01-19 20:54 ` jakub at gcc dot gnu.org
@ 2011-02-07 20:16 ` dodji at gcc dot gnu.org
2011-02-09 14:28 ` dodji at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-02-07 20:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47172
Dodji Seketeli <dodji at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |dodji at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |dodji at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/47172] [4.6 Regression] [C++0x] cannot call member function without object
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
` (3 preceding siblings ...)
2011-02-07 20:16 ` dodji at gcc dot gnu.org
@ 2011-02-09 14:28 ` dodji at gcc dot gnu.org
2011-02-11 7:48 ` dodji at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-02-09 14:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47172
--- Comment #3 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-02-09 14:27:44 UTC ---
Candidate patch posted to
http://gcc.gnu.org/ml/gcc-patches/2011-02/msg00603.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/47172] [4.6 Regression] [C++0x] cannot call member function without object
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
` (4 preceding siblings ...)
2011-02-09 14:28 ` dodji at gcc dot gnu.org
@ 2011-02-11 7:48 ` dodji at gcc dot gnu.org
2011-02-11 11:09 ` dodji at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-02-11 7:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47172
--- Comment #4 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-02-11 07:33:57 UTC ---
Author: dodji
Date: Fri Feb 11 07:33:53 2011
New Revision: 170045
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170045
Log:
Fix PR c++/47172
gcc/cp/
PR c++/47172
* pt.c (finish_call_expr): Consider a call expression that has a
dependent "this" pointer as being dependent. Add comments.
(dependent_type_p, type_dependent_expression_p): Update comments.
gcc/testsuite/
* g++.dg/template/inherit6.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/template/inherit6.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/47172] [4.6 Regression] [C++0x] cannot call member function without object
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
` (5 preceding siblings ...)
2011-02-11 7:48 ` dodji at gcc dot gnu.org
@ 2011-02-11 11:09 ` dodji at gcc dot gnu.org
2011-02-11 15:40 ` hjl.tools at gmail dot com
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-02-11 11:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47172
Dodji Seketeli <dodji at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #5 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-02-11 10:54:41 UTC ---
Fixed in trunk (4.6)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/47172] [4.6 Regression] [C++0x] cannot call member function without object
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
` (6 preceding siblings ...)
2011-02-11 11:09 ` dodji at gcc dot gnu.org
@ 2011-02-11 15:40 ` hjl.tools at gmail dot com
2011-02-11 17:40 ` dodji at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hjl.tools at gmail dot com @ 2011-02-11 15:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47172
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2011-02-11 15:32:08 UTC ---
I don't think it is fixed. See PR 47697.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/47172] [4.6 Regression] [C++0x] cannot call member function without object
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
` (7 preceding siblings ...)
2011-02-11 15:40 ` hjl.tools at gmail dot com
@ 2011-02-11 17:40 ` dodji at gcc dot gnu.org
2011-02-14 8:40 ` ebotcazou at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-02-11 17:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47172
--- Comment #7 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-02-11 17:27:04 UTC ---
Author: dodji
Date: Fri Feb 11 17:27:00 2011
New Revision: 170055
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170055
Log:
Revert "Fix PR c++/47172"
gcc/cp/
* pt.c (finish_call_expr, dependent_type_p)
(type_dependent_expression_p): Revert the previous attempt to fix
PR c++/47172.
gcc/testsuite/
* g++.dg/template/inherit6.C: Reverted.
Removed:
trunk/gcc/testsuite/g++.dg/template/inherit6.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/47172] [4.6 Regression] [C++0x] cannot call member function without object
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
` (8 preceding siblings ...)
2011-02-11 17:40 ` dodji at gcc dot gnu.org
@ 2011-02-14 8:40 ` ebotcazou at gcc dot gnu.org
2011-02-17 6:52 ` dodji at gcc dot gnu.org
2011-02-17 7:20 ` dodji at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-02-14 8:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47172
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |ASSIGNED
CC| |ebotcazou at gcc dot
| |gnu.org
--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-02-14 08:24:19 UTC ---
Adjust.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/47172] [4.6 Regression] [C++0x] cannot call member function without object
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
` (9 preceding siblings ...)
2011-02-14 8:40 ` ebotcazou at gcc dot gnu.org
@ 2011-02-17 6:52 ` dodji at gcc dot gnu.org
2011-02-17 7:20 ` dodji at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-02-17 6:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47172
--- Comment #9 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-02-17 06:50:40 UTC ---
Author: dodji
Date: Thu Feb 17 06:50:35 2011
New Revision: 170240
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170240
Log:
Fix PR c++/47172
gcc/cp/
PR c++/47172
* pt.c (finish_call_expr): Consider a call expression that has a
dependent "this" pointer as being dependent. Add comments.
(dependent_type_p, type_dependent_expression_p): Update comments.
gcc/testsuite/
* g++.dg/template/inherit6.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/template/inherit6.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/47172] [4.6 Regression] [C++0x] cannot call member function without object
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
` (10 preceding siblings ...)
2011-02-17 6:52 ` dodji at gcc dot gnu.org
@ 2011-02-17 7:20 ` dodji at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu.org @ 2011-02-17 7:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47172
Dodji Seketeli <dodji at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #10 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-02-17 06:52:04 UTC ---
Hopefully fixed in trunk (4.6) this time.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-02-17 6:52 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-04 21:42 [Bug c++/47172] New: [C++0x] cannot call member function without object marc.glisse at normalesup dot org
2011-01-04 22:28 ` [Bug c++/47172] [4.6 Regression] " redi at gcc dot gnu.org
2011-01-04 22:50 ` hjl.tools at gmail dot com
2011-01-19 20:54 ` jakub at gcc dot gnu.org
2011-02-07 20:16 ` dodji at gcc dot gnu.org
2011-02-09 14:28 ` dodji at gcc dot gnu.org
2011-02-11 7:48 ` dodji at gcc dot gnu.org
2011-02-11 11:09 ` dodji at gcc dot gnu.org
2011-02-11 15:40 ` hjl.tools at gmail dot com
2011-02-11 17:40 ` dodji at gcc dot gnu.org
2011-02-14 8:40 ` ebotcazou at gcc dot gnu.org
2011-02-17 6:52 ` dodji at gcc dot gnu.org
2011-02-17 7:20 ` dodji at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).