diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-06-06 18:13:12 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-06-06 14:13:12 -0400 |
commit | 3070ba0b8633736c0b12b463e3dbc968e79e39c9 (patch) | |
tree | 54bbe6f2051c407e03849b3256a564d6182f4be2 /gcc | |
parent | e37cda9b2c552b1bf1fe5f8431d749c94d2cdbf5 (diff) | |
download | gcc-3070ba0b8633736c0b12b463e3dbc968e79e39c9.zip gcc-3070ba0b8633736c0b12b463e3dbc968e79e39c9.tar.gz gcc-3070ba0b8633736c0b12b463e3dbc968e79e39c9.tar.bz2 |
* search.c (envelope_add_decl): Tweak for implicit typename.
From-SVN: r20264
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/search.c | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 65a4819..cec9536 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 1998-06-05 Jason Merrill <jason@yorick.cygnus.com> + * search.c (envelope_add_decl): Tweak for implicit typename. + * call.c (joust): Also warn about confusing conversion op/constructor overload resolution. diff --git a/gcc/cp/search.c b/gcc/cp/search.c index d2ad247..6d2a530 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -3333,6 +3333,12 @@ envelope_add_decl (type, decl, values) tree name = DECL_NAME (decl); int dont_add = 0; + /* Yet Another Implicit Typename Kludge: Since we don't tsubst + the members for partial instantiations, DECL_CONTEXT (decl) is wrong. + But pretend it's right for this function. */ + if (processing_template_decl) + type = DECL_REAL_CONTEXT (decl); + /* virtual base names are always unique. */ if (VBASE_NAME_P (name)) *values = NULL_TREE; @@ -3354,10 +3360,7 @@ envelope_add_decl (type, decl, values) warning ("in this context"); } - context = (TREE_CODE (value) == FUNCTION_DECL - && DECL_VIRTUAL_P (value)) - ? DECL_CLASS_CONTEXT (value) - : DECL_CONTEXT (value); + context = DECL_REAL_CONTEXT (value); if (context == type) { |