typeck.c (build_function_call_real): Remove "inline called before definition" pedwarn.
authorJason Merrill <jason@yorick.cygnus.com>
Mon, 15 Dec 1997 20:34:29 +0000 (20:34 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 15 Dec 1997 20:34:29 +0000 (15:34 -0500)
* typeck.c (build_function_call_real): Remove "inline called before
definition" pedwarn.

* pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.

From-SVN: r17109

gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/cp/typeck.c

index 0a628dacddaf9830368b8415453d2343303a5db5..b4196fc1a196363e807164e429f5c4d897e02952 100644 (file)
@@ -1,3 +1,10 @@
+Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * typeck.c (build_function_call_real): Remove "inline called before
+       definition" pedwarn.
+
+       * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
+
 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
        * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
index 8dff4c1a01bf3c8cb0701c6a2974f3b822058fe6..0e4d6c936a55d7b98c3555877a8b99cebceea47d 100644 (file)
@@ -1075,9 +1075,8 @@ coerce_template_parms (parms, arglist, in_decl)
        {
          tree t = tsubst (TREE_TYPE (parm), vec,
                           TREE_VEC_LENGTH (vec), in_decl);
-         if (processing_template_decl && 
-             (uses_template_parms (arg) || uses_template_parms (t)))
-           val = arg;
+         if (processing_template_decl)
+           val = maybe_fold_nontype_arg (arg);
          else
            val = digest_init (t, arg, (tree *) 0);
 
index 1edd1bbaff20c1e3ee460b293800b441fd61bec3..82db8653999ded9227e36c555534e04961f843b9 100644 (file)
@@ -2645,12 +2645,6 @@ build_function_call_real (function, params, require_complete, flags)
          pedwarn ("ANSI C++ forbids calling `main' from within program");
        }
 
-      if (pedantic && DECL_THIS_INLINE (function) && ! DECL_INITIAL (function)
-         && ! DECL_ARTIFICIAL (function)
-         && ! DECL_PENDING_INLINE_INFO (function))
-       cp_pedwarn ("inline function `%#D' called before definition",
-                   function);
-
       /* Differs from default_conversion by not setting TREE_ADDRESSABLE
         (because calling an inline function does not mean the function
         needs to be separately compiled).  */