Dear all, I would like to post a bug report for the GNU C/C++ compiler 3.3-e500.
We use the compiler to generate code for a PowerPC processor. Used invokation line for the GNU C++ compiler: ccppc -c -x c++ -ansi -Wall -Werror -mcpu=8540 -fverbose-asm -mbig -fmerge-templates -mmultiple -mno-string -mstrict-align -O3 -fno-exceptions -fno-rtti -fno-builtin-printf -I<different include paths> -D<differen #define's> X.CPP -oX.O // file X.CPP class C; typedef int C::* T1; const T1* f (const void* p) { return static_cast<const T1*>(p); // <--- line 7 } The compiler gives the following error message: X.CPP: In function `int C::** f(const void*)': X.CPP:7: error: static_cast from type `const void*' to type `int C::**' casts away constness The compiler seems to take the type "const T1*" incorrectly as "int C::**" and not as "int C::* const *". Kind regards W. Roehrl -- Summary: Pointer to pointer-to-member Product: gcc Version: 3.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: wolfgang dot roehrl at gi-de dot com GCC build triplet: sparc-sun-solaris2.5.1 GCC host triplet: i386-pc-mingw32 GCC target triplet: powerpc-wrs-vxworks http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26332