aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog20
-rw-r--r--gcc/cp/decl.c9
-rw-r--r--gcc/cp/lex.c13
-rw-r--r--gcc/cp/pt.c2
4 files changed, 40 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8dda7f9..5dc6540 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,8 +1,26 @@
+1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
+
+ * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
+ turned off.
+
+1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
+
+ * 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 <Marc.Espie@liafa.jussieu.fr>
* 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 <Theodore.Papadopoulo@sophia.inria.fr>
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 95b16d2..b206fd6 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 0e61c35..cff3064 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 901005b..dd805da 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 T, class Allocator = allocator>
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;