]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
/cp
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Aug 2013 12:04:19 +0000 (12:04 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Aug 2013 12:04:19 +0000 (12:04 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201629 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/typedef2.C [deleted file]

index d3709fa38ad9c28b1a95b9530632496c73b44ff3..fc10e95607871dd2bd9b01fb497a7a7fab31faf2 100644 (file)
@@ -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
index 05f048068b398116b899a34490ba4f71272bb553..0fe0246913882a4b8d6073a3efd09d7faec94090 100644 (file)
@@ -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;
 
index 1e682b96fd85ea12f3bb7109beee6f853813d576..9f9a932e15a0cfe0bd9d64e6cfad7248b02bf67c 100644 (file)
@@ -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
diff --git a/gcc/testsuite/g++.dg/lookup/typedef2.C b/gcc/testsuite/g++.dg/lookup/typedef2.C
deleted file mode 100644 (file)
index fdadeec..0000000
+++ /dev/null
@@ -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;
-  }
-};