mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-26 16:51:01 +08:00
re PR c++/27821 (ICE with invalid ptr-to-member)
PR c++/27821 * decl.c (grokdeclarator): Return error_mark_node on invalid uses of the scope resolution operator. From-SVN: r114899
This commit is contained in:
parent
0ef9029680
commit
9a171ca4b0
@ -2,6 +2,10 @@
|
||||
|
||||
PR c++/27805
|
||||
* typeck2.c (build_m_component_ref): Use error_operand_p.
|
||||
|
||||
PR c++/27821
|
||||
* decl.c (grokdeclarator): Return error_mark_node on
|
||||
invalid uses of the scope resolution operator.
|
||||
|
||||
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
|
@ -8151,7 +8151,7 @@ grokdeclarator (const cp_declarator *declarator,
|
||||
{
|
||||
/* Something like struct S { int N::j; }; */
|
||||
error ("invalid use of %<::%>");
|
||||
decl = NULL_TREE;
|
||||
return error_mark_node;
|
||||
}
|
||||
else if (TREE_CODE (type) == FUNCTION_TYPE)
|
||||
{
|
||||
|
@ -7,6 +7,9 @@
|
||||
|
||||
PR c++/27805
|
||||
* g++.dg/parse/ptrmem6.C: New test.
|
||||
|
||||
PR c++/27821
|
||||
* g++.dg/template/error22.C: New test.
|
||||
|
||||
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
|
9
gcc/testsuite/g++.dg/template/error22.C
Normal file
9
gcc/testsuite/g++.dg/template/error22.C
Normal file
@ -0,0 +1,9 @@
|
||||
//PR c++/27821
|
||||
|
||||
struct A
|
||||
{
|
||||
template<void (A::*)()> struct B {};
|
||||
void ::foo(); // { dg-error "invalid use" }
|
||||
B<&A::foo> b; // { dg-errror "incomplete type|template argument" }
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user