[Bug c++/14271] New: problem to get value on pointer to class-function
pierre dot tarayre at st dot com
gcc-bugzilla@gcc.gnu.org
Tue Feb 24 10:34:00 GMT 2004
/apa/free2/stow/SunOS/5.8/gcc-2.95.2/bin/g++ -g -Wall -c pointer.cpp
pointer.cpp: In function `int main(int, char **)':
pointer.cpp:36: Internal compiler error 990506.
pointer.cpp:36: Please submit a full bug report.
listing of pointer.cpp file
#include <stdio.h>
class my_class
{
public:
int var1;
void inc_var();
my_class ()
{
var1 = 0;
}
};
void my_class::inc_var()
{
var1++;
}
int main(int argc, char* argv[])
{
void (my_class::*pFUNCTION)()=NULL;
pFUNCTION = &my_class::inc_var;
printf("pCLASS = 0x%x \n", (unsigned int) pFUNCTION.__pfn_or_delta2.__pfn);
// printf("pCLASS = 0x%x \n", pFUNCTION);
my_class instance_1;
instance_1.inc_var();
// (instance_1->*pFUNCTION)();
void(*(pFUNCTION.__pfn_or_delta2.__pfn))(void);
return 0;
}
--
Summary: problem to get value on pointer to class-function
Product: gcc
Version: 2.95.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pierre dot tarayre at st dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: SunOS 5.8
GCC host triplet: SunOS 5.8
GCC target triplet: SunOS 5.8
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14271
More information about the Gcc-bugs
mailing list