PR c++/84820 - no error for invalid qualified-id.
* parser.c (cp_parser_make_indirect_declarator): Don't wrap cp_error_declarator. From-SVN: r258549
This commit is contained in:
parent
e62d673d78
commit
8cb1151b60
|
@ -1,5 +1,9 @@
|
|||
2018-03-14 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/84820 - no error for invalid qualified-id.
|
||||
* parser.c (cp_parser_make_indirect_declarator): Don't wrap
|
||||
cp_error_declarator.
|
||||
|
||||
PR c++/84801 - ICE with unexpanded pack in lambda.
|
||||
* pt.c (check_for_bare_parameter_packs): Don't return early for a
|
||||
lambda in non-template context.
|
||||
|
|
|
@ -3823,7 +3823,7 @@ cp_parser_make_indirect_declarator (enum tree_code code, tree class_type,
|
|||
cp_declarator *target,
|
||||
tree attributes)
|
||||
{
|
||||
if (code == ERROR_MARK)
|
||||
if (code == ERROR_MARK || target == cp_error_declarator)
|
||||
return cp_error_declarator;
|
||||
|
||||
if (code == INDIRECT_REF)
|
||||
|
|
|
@ -8,6 +8,5 @@ void foo()
|
|||
// Check that we do not complain about an unused
|
||||
// compiler-generated variable.
|
||||
A& = a; // { dg-error "6:expected unqualified-id before '=' token" "6" }
|
||||
// { dg-error "8:'a' was not declared in this scope" "8" { target *-*-* } .-1 }
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
// PR c++/84820
|
||||
|
||||
struct A {};
|
||||
|
||||
template<int> struct B : A
|
||||
{
|
||||
B()
|
||||
{
|
||||
A(&A::foo); // { dg-error "foo" }
|
||||
}
|
||||
};
|
||||
|
||||
B<0> b;
|
Loading…
Reference in New Issue