OSDN Git Service

* pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Feb 1999 02:42:48 +0000 (02:42 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Feb 1999 02:42:48 +0000 (02:42 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25036 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/lex.c
gcc/cp/pt.c

index 8dda7f9..5dc6540 100644 (file)
@@ -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>
 
index 95b16d2..b206fd6 100644 (file)
@@ -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);
index 0e61c35..cff3064 100644 (file)
@@ -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
index 901005b..dd805da 100644 (file)
@@ -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;