diff options
| author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-27 10:47:36 +0000 |
|---|---|---|
| committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-27 10:47:36 +0000 |
| commit | a321abdb59be41dfddd43cb690be9bd0dc393caf (patch) | |
| tree | 0db5d6c3a3f6dcb5dd8296b756654750fccb07fa /gcc/cp/decl.c | |
| parent | d790079b133ce33b7f17dad78493db749fe6a49e (diff) | |
| download | ppe42-gcc-a321abdb59be41dfddd43cb690be9bd0dc393caf.tar.gz ppe42-gcc-a321abdb59be41dfddd43cb690be9bd0dc393caf.zip | |
cp:
* cp-tree.h (adjust_clone_args): Prototype new function.
* class.c (adjust_clone_args): New function.
* decl.c (start_function): Call it for in charge ctors.
testsuite:
* g++.old-deja/g++.other/defarg9.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41625 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
| -rw-r--r-- | gcc/cp/decl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index ea37eb45c0d..246cbd7f4b3 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -13345,6 +13345,12 @@ start_function (declspecs, declarator, attrs, flags) } } + if (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl1)) + /* This is a constructor, we must ensure that any default args + introduced by this definition are propagated to the clones + now. The clones are used directly in overload resolution. */ + adjust_clone_args (decl1); + /* Sometimes we don't notice that a function is a static member, and build a METHOD_TYPE for it. Fix that up now. */ if (ctype != NULL_TREE && DECL_STATIC_FUNCTION_P (decl1) |

