mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-13 16:41:19 +08:00
re PR c++/27447 (ICE on invalid ptr-to-member-function)
PR c++/27447 * decl2.c (build_memfn_type): Skip invalid functions and class types. * g++.dg/other/ptrmem7.C: New test. From-SVN: r113615
This commit is contained in:
parent
abf5fd2fab
commit
15218346be
@ -1,3 +1,8 @@
|
||||
2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27447
|
||||
* decl2.c (build_memfn_type): Skip invalid functions and class types.
|
||||
|
||||
2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27427
|
||||
|
@ -114,6 +114,9 @@ build_memfn_type (tree fntype, tree ctype, cp_cv_quals quals)
|
||||
tree raises;
|
||||
int type_quals;
|
||||
|
||||
if (fntype == error_mark_node || ctype == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
type_quals = quals & ~TYPE_QUAL_RESTRICT;
|
||||
ctype = cp_build_qualified_type (ctype, type_quals);
|
||||
fntype = build_method_type_directly (ctype, TREE_TYPE (fntype),
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/27447
|
||||
* g++.dg/other/ptrmem7.C: New test.
|
||||
|
||||
2006-05-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR target/27421
|
||||
|
4
gcc/testsuite/g++.dg/other/ptrmem7.C
Normal file
4
gcc/testsuite/g++.dg/other/ptrmem7.C
Normal file
@ -0,0 +1,4 @@
|
||||
// PR c++/27447
|
||||
// { dg-do compile }
|
||||
|
||||
void (A::* p)(); // { dg-error "declared|token" }
|
Loading…
x
Reference in New Issue
Block a user