From fcfcdfc8970fd436587ee62f65d2df23d74d506c Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Thu, 4 Feb 1999 21:42:48 -0500 Subject: [PATCH] pt.c (unify): Call coerce_template_parms with the COMPLAIN flag turned off. * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag turned off. * lex.c (retrofit_lang_decl): Split out... (build_lang_decl): From here. * decl.c (pushdecl): Call it for functions generated by the middle end that don't have DECL_LANG_SPECIFIC. * decl2.c: Remove flag_init_priority. Always enable initp stuff. (start_objects, finish_objects): Only use special init_priority code if the user specified a priority. (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp objects. From-SVN: r25036 --- gcc/cp/ChangeLog | 20 +++++++++++++++++++- gcc/cp/decl.c | 9 +++++++++ gcc/cp/lex.c | 13 +++++++++++-- gcc/cp/pt.c | 2 +- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8dda7f93b46..5dc6540c2c0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,8 +1,26 @@ +1999-02-04 Kriang Lerdsuwanakij + + * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag + turned off. + +1999-02-04 Jason Merrill + + * lex.c (retrofit_lang_decl): Split out... + (build_lang_decl): From here. + * decl.c (pushdecl): Call it for functions generated by the middle + end that don't have DECL_LANG_SPECIFIC. + + * decl2.c: Remove flag_init_priority. Always enable initp stuff. + (start_objects, finish_objects): Only use special + init_priority code if the user specified a priority. + (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp + objects. + Wed Feb 3 22:50:17 1999 Marc Espie * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and mkstemp.o. Get them from libiberty now. - (DEMANGLER_PROG): Simlarly, temove getopt.o getopt1.o. + (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o. Tue Feb 2 22:38:48 1999 Theodore Papadopoulo diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 95b16d29abe..b206fd6f767 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3671,6 +3671,15 @@ pushdecl (x) check_template_shadow (x); + /* If this is a function conjured up by the backend, massage it + so it looks friendly. */ + if (TREE_CODE (x) == FUNCTION_DECL + && ! DECL_LANG_SPECIFIC (x)) + { + retrofit_lang_decl (x); + DECL_LANGUAGE (x) = lang_c; + } + if (TREE_CODE (x) == FUNCTION_DECL && ! DECL_FUNCTION_MEMBER_P (x)) { t = push_overloaded_decl (x, PUSH_LOCAL); diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 0e61c350ba2..cff3064d3dc 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -4561,6 +4561,17 @@ build_lang_decl (code, name, type) tree type; { register tree t = build_decl (code, name, type); + retrofit_lang_decl (t); + return t; +} + +/* Add DECL_LANG_SPECIFIC info to T. Called from build_lang_decl + and pushdecl (for functions generated by the backend). */ + +void +retrofit_lang_decl (t) + tree t; +{ struct obstack *obstack = current_obstack; register int i = sizeof (struct lang_decl) / sizeof (int); register int *pi; @@ -4609,8 +4620,6 @@ build_lang_decl (code, name, type) tree_node_counts[(int)lang_decl] += 1; tree_node_sizes[(int)lang_decl] += sizeof (struct lang_decl); #endif - - return t; } tree diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 901005b7cf9..dd805da3967 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -7506,7 +7506,7 @@ unify (tparms, targs, parm, arg, strict, explicit_mask) template class vector. */ - if (coerce_template_parms (argtmplvec, parmvec, parmtmpl, 1, 1) + if (coerce_template_parms (argtmplvec, parmvec, parmtmpl, 0, 1) == error_mark_node) return 1; -- 2.30.2