]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* decl.c (grok_op_properties): Add an extra check of argtypes.
authorCosmin Truta <cosmint@cs.ubbcluj.ro>
Fri, 28 Apr 2000 22:10:24 +0000 (01:10 +0300)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 28 Apr 2000 22:10:24 +0000 (18:10 -0400)
From-SVN: r33524

gcc/cp/ChangeLog
gcc/cp/decl.c

index 7f96445a2076754babd96eac7ee7f0edaa7a2cd2..42c63fca7a933014c1bc70f48e06095018e163dd 100644 (file)
@@ -1,3 +1,7 @@
+2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
+
+       * decl.c (grok_op_properties): Add an extra check of argtypes.
+
 2000-04-28  Jason Merrill  <jason@casey.cygnus.com>
 
        * optimize.c (initialize_inlined_parameters): Call 
index 78c416719572e32be6fd80bab5348a220152f9a2..deb9e8f3077f63ddc4833e23ab00e3173c65e457 100644 (file)
@@ -12361,20 +12361,21 @@ grok_op_properties (decl, virtualp, friendp)
        cp_warning ("`%D' should return by value", decl);
 
       /* 13.4.0.8 */
-      if (argtypes)
-       for (; argtypes != void_list_node ; argtypes = TREE_CHAIN (argtypes))
-         if (TREE_PURPOSE (argtypes))
-           {
-             TREE_PURPOSE (argtypes) = NULL_TREE;
-             if (name == ansi_opname[(int) POSTINCREMENT_EXPR]
-                 || name == ansi_opname[(int) POSTDECREMENT_EXPR])
-               {
-                 if (pedantic)
-                   cp_pedwarn ("`%D' cannot have default arguments", decl);
-               }
-             else
-               cp_error ("`%D' cannot have default arguments", decl);
-           }
+      for (; argtypes && argtypes != void_list_node;
+          argtypes = TREE_CHAIN (argtypes))
+        if (TREE_PURPOSE (argtypes))
+          {
+            TREE_PURPOSE (argtypes) = NULL_TREE;
+            if (name == ansi_opname[(int) POSTINCREMENT_EXPR] 
+                || name == ansi_opname[(int) POSTDECREMENT_EXPR])   
+              {
+                if (pedantic)
+                  cp_pedwarn ("`%D' cannot have default arguments", decl);
+              }
+            else
+              cp_error ("`%D' cannot have default arguments", decl);
+          }
+
     }
 }
 \f