aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosmin Truta <cosmint@cs.ubbcluj.ro>2000-04-29 01:10:24 +0300
committerJason Merrill <jason@gcc.gnu.org>2000-04-28 18:10:24 -0400
commit34332678dad233a6d4ec0a85e47f6d65397def1c (patch)
tree0da62c557bc4e664f3b0d61d07724d42eaa993a2
parent62014cb327937ccceb215e7a2a1e87a70244620c (diff)
downloadgcc-34332678dad233a6d4ec0a85e47f6d65397def1c.zip
gcc-34332678dad233a6d4ec0a85e47f6d65397def1c.tar.gz
gcc-34332678dad233a6d4ec0a85e47f6d65397def1c.tar.bz2
* decl.c (grok_op_properties): Add an extra check of argtypes.
From-SVN: r33524
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/decl.c29
2 files changed, 19 insertions, 14 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 7f96445..42c63fc 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 78c4167..deb9e8f 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -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);
+ }
+
}
}