re PR c++/16853 (pointer-to-member initialization from incompatible one accepted)
authorMark Mitchell <mark@codesourcery.com>
Thu, 12 Aug 2004 00:43:47 +0000 (00:43 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 12 Aug 2004 00:43:47 +0000 (00:43 +0000)
commit539599c198f2f5e445744221058af9d8a7f96a02
treefd96ba601837e4bdc98384092836948628296674
parenteb3643d8009ad661b65a9deea6cb2aad7e23d41b
re PR c++/16853 (pointer-to-member initialization from incompatible one accepted)

PR c++/16853
* call.c (standard_conversion): Do not accept conversions between
pointers to members if the class types are unrelated.

PR c++/16618
* parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
char &" instead of just "char &".

PR c++/16870
* pt.c (tsubst): Just return the unknown_type_node.

PR c++/16853
* g++.dg/init/ptrmem1.C: New test.

PR c++/16618
* g++.dg/parse/offsetof5.C: New test.

PR c++/16870
* g++.dg/template/overload3.C: New test.

From-SVN: r85840
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/ptrmem1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/parse/offsetof5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/overload3.C [new file with mode: 0644]