diff options
author | Mark Mitchell <mark@codesourcery.com> | 1999-05-19 20:01:04 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-05-19 20:01:04 +0000 |
commit | 11f98788836d76f227f295fbb685564a88fdefa2 (patch) | |
tree | 57708633f055a3f0a1cf76f87207cb8409278a50 /gcc | |
parent | 550c249201334f713788127ac5890fdc8ed4bc0b (diff) | |
download | gcc-11f98788836d76f227f295fbb685564a88fdefa2.zip gcc-11f98788836d76f227f295fbb685564a88fdefa2.tar.gz gcc-11f98788836d76f227f295fbb685564a88fdefa2.tar.bz2 |
* pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
From-SVN: r27034
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/pt.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/conv3.C | 10 |
3 files changed, 13 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9a30a2fe..8e478d6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 1999-05-19 Mark Mitchell <mark@codesourcery.com> + * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P. + * decl2.c (start_static_storage_duration_function): Fix comment. (finish_file): Create static storage duration functions lazily. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 6c316518..338ed81 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1950,6 +1950,7 @@ build_template_decl (decl, parms) DECL_CLASS_CONTEXT (tmpl) = DECL_CLASS_CONTEXT (decl); DECL_STATIC_FUNCTION_P (tmpl) = DECL_STATIC_FUNCTION_P (decl); DECL_CONSTRUCTOR_P (tmpl) = DECL_CONSTRUCTOR_P (decl); + DECL_NONCONVERTING_P (tmpl) = DECL_NONCONVERTING_P (decl); } return tmpl; diff --git a/gcc/testsuite/g++.old-deja/g++.pt/conv3.C b/gcc/testsuite/g++.old-deja/g++.pt/conv3.C new file mode 100644 index 0000000..861b688 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/conv3.C @@ -0,0 +1,10 @@ +// Build don't link: +// Origin: Chris Heath <cheath@math.lsa.umich.edu> + +struct A { + template<typename T> explicit A(T t) {} +}; + +void f(A a) {} + +int main() {f(1);} // ERROR - no conversion from int to A. |