This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16153] New: "typeof" fails in building pointer-to-member-function
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jun 2004 07:25:10 -0000
- Subject: [Bug c++/16153] New: "typeof" fails in building pointer-to-member-function
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
class B{};
class A{
public:
void Foo(B& buf) {}
};
int main() {
void (A::*p)(B&) = &A::Foo;
A a;
void (A::*q)(B&) = &typeof<a>::Foo;
return 0;
}
gets you:
~/ootbc/common/test/src$ g++ foo.cc
foo.cc: In function `int main()':
foo.cc:10: error: expected primary-expression before "typeof"
foo.cc:10: error: expected `,' or `;' before "typeof"
Parentheses don't seem to help. Comeau doesn't do "typeof"
Ivan
--
Summary: "typeof" fails in building pointer-to-member-function
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16153