diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-18 16:05:40 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-18 16:05:40 +0000 |
commit | d7b0d4e703fe17905d497fd455a85ba2520e774e (patch) | |
tree | 1b236ea0b57d049c968cfe54f950db94f793ef09 | |
parent | dd36d7bcef8d95f7df2aa6826f5159dc6bc41c7f (diff) | |
download | gcc-d7b0d4e703fe17905d497fd455a85ba2520e774e.tar.gz |
gcc/cp/
PR c++/45049
* name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
TREE_CHAIN.
gcc/testsuite/
PR c++/45049
* g++.dg/pr45049-1.C: New test.
* g++.dg/pr45049-2.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163344 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/pr45049-1.C | 17 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/pr45049-2.C | 9 |
5 files changed, 40 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b3732661915..f8e53540382 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2010-08-18 Nathan Froyd <froydnj@codesourcery.com> + + PR c++/45049 + * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to + TREE_CHAIN. + 2010-08-17 Kai Tietz <kai.tietz@onevision.com> * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks, diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 01f29e43772..800e340de95 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -2157,7 +2157,7 @@ push_overloaded_decl (tree decl, int flags, bool is_friend) for (d = &IDENTIFIER_BINDING (name)->scope->names; *d; - d = &DECL_CHAIN (*d)) + d = &TREE_CHAIN (*d)) if (*d == old || (TREE_CODE (*d) == TREE_LIST && TREE_VALUE (*d) == old)) @@ -2168,7 +2168,7 @@ push_overloaded_decl (tree decl, int flags, bool is_friend) else /* Build a TREE_LIST to wrap the OVERLOAD. */ *d = tree_cons (NULL_TREE, new_binding, - DECL_CHAIN (*d)); + TREE_CHAIN (*d)); /* And update the cxx_binding node. */ IDENTIFIER_BINDING (name)->value = new_binding; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e4c980e4062..32f4228df45 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-08-18 Nathan Froyd <froydnj@codesourcery.com> + + PR c++/45049 + * g++.dg/pr45049-1.C: New test. + * g++.dg/pr45049-2.C: New test. + 2010-08-18 Jie Zhang <jie@codesourcery.com> * gcc.dg/builtin-apply2.c (STACK_ARGUMENTS_SIZE): Define to diff --git a/gcc/testsuite/g++.dg/pr45049-1.C b/gcc/testsuite/g++.dg/pr45049-1.C new file mode 100644 index 00000000000..7b1dcd568eb --- /dev/null +++ b/gcc/testsuite/g++.dg/pr45049-1.C @@ -0,0 +1,17 @@ +/* { dg-do compile } */ + +namespace n1 { + void modf (); +} + +namespace n2 { + void trunc (); + void modf (); +} + +void max () +{ + using n1::modf; + using n2::trunc; + using n2::modf; +} diff --git a/gcc/testsuite/g++.dg/pr45049-2.C b/gcc/testsuite/g++.dg/pr45049-2.C new file mode 100644 index 00000000000..a9518842edb --- /dev/null +++ b/gcc/testsuite/g++.dg/pr45049-2.C @@ -0,0 +1,9 @@ +/* { dg-do compile } */ + +void foo() +{ + void bar(int); + void baz(int); + void baz(void); + void bar(void); +} |