re PR c++/14510 (Lookup error between function name and struct name)
PR c++/14510 * decl.c (xref_tag): Disregard non-type declarations when looking up a tagged type. PR c++/14510 * g++.dg/lookup/struct2.C: New test. From-SVN: r79298
This commit is contained in:
parent
4d0c31e68c
commit
e46e9f822e
@ -1,3 +1,9 @@
|
||||
2004-03-10 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/14510
|
||||
* decl.c (xref_tag): Disregard non-type declarations when
|
||||
looking up a tagged type.
|
||||
|
||||
2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
PR c++/14397
|
||||
|
@ -9305,7 +9305,7 @@ xref_tag (enum tag_types tag_code, tree name,
|
||||
}
|
||||
else
|
||||
{
|
||||
tree decl = lookup_name (name, 1);
|
||||
tree decl = lookup_name (name, 2);
|
||||
|
||||
if (decl && DECL_CLASS_TEMPLATE_P (decl))
|
||||
decl = DECL_TEMPLATE_RESULT (decl);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-03-10 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/14510
|
||||
* g++.dg/lookup/struct2.C: New test.
|
||||
|
||||
2004-03-10 Uros Bizjak <uros@kss-loka.si>
|
||||
|
||||
* gcc.dg/builtins-34.c: New test.
|
||||
|
7
gcc/testsuite/g++.dg/lookup/struct2.C
Normal file
7
gcc/testsuite/g++.dg/lookup/struct2.C
Normal file
@ -0,0 +1,7 @@
|
||||
// PR c++/14510
|
||||
|
||||
struct c {};
|
||||
namespace A {
|
||||
int c(struct c*req);
|
||||
}
|
||||
int A::c(struct c*req) {}
|
Loading…
Reference in New Issue
Block a user