revert: re PR c++/46206 (using typedef-name error with typedef name hiding struct name)
/cp 2013-08-09 Paolo Carlini <paolo.carlini@oracle.com> Revert: 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com> PR c++/46206 * name-lookup.c (lookup_name_real_1): Handle iter->type before iter->value. /testsuite 2013-08-09 Paolo Carlini <paolo.carlini@oracle.com> Revert: 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com> PR c++/46206 * g++.dg/lookup/typedef2.C: New. From-SVN: r201629
This commit is contained in:
parent
aa1e10cca1
commit
6efa6002d5
@ -1,3 +1,12 @@
|
||||
2013-08-09 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
Revert:
|
||||
2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/46206
|
||||
* name-lookup.c (lookup_name_real_1): Handle iter->type before
|
||||
iter->value.
|
||||
|
||||
2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/46206
|
||||
|
@ -4740,11 +4740,11 @@ lookup_name_real_1 (tree name, int prefer_type, int nonclass, bool block_p,
|
||||
continue;
|
||||
|
||||
/* If this is the kind of thing we're looking for, we're done. */
|
||||
if ((flags & LOOKUP_PREFER_TYPES)
|
||||
&& qualify_lookup (iter->type, flags))
|
||||
binding = iter->type;
|
||||
else if (qualify_lookup (iter->value, flags))
|
||||
if (qualify_lookup (iter->value, flags))
|
||||
binding = iter->value;
|
||||
else if ((flags & LOOKUP_PREFER_TYPES)
|
||||
&& qualify_lookup (iter->type, flags))
|
||||
binding = iter->type;
|
||||
else
|
||||
binding = NULL_TREE;
|
||||
|
||||
|
@ -1,3 +1,11 @@
|
||||
2013-08-09 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
Revert:
|
||||
2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/46206
|
||||
* g++.dg/lookup/typedef2.C: New.
|
||||
|
||||
2013-08-09 James Greenhalgh <james.greenhalgh@arm.com>
|
||||
|
||||
* gcc.target/aarch64/scalar_intrinsics.c: Update expected
|
||||
|
@ -1,30 +0,0 @@
|
||||
// PR c++/46206
|
||||
|
||||
class Foo1
|
||||
{
|
||||
int u, v, w, x;
|
||||
typedef struct Bar { } Bar;
|
||||
virtual void foo(void) {
|
||||
struct Bar bar;
|
||||
}
|
||||
};
|
||||
|
||||
class Foo2
|
||||
{
|
||||
int u, v, w;
|
||||
typedef struct Bar { } Bar;
|
||||
Bar bar;
|
||||
virtual void foo(void) {
|
||||
struct Bar bar;
|
||||
}
|
||||
};
|
||||
|
||||
class Foo3
|
||||
{
|
||||
int u, v, w;
|
||||
typedef struct Bar { } Bar;
|
||||
int Bar; // { dg-error "conflicts" }
|
||||
virtual void foo(void) {
|
||||
struct Bar bar;
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user