From: Cosmin Truta Date: Fri, 28 Apr 2000 22:10:24 +0000 (+0300) Subject: * decl.c (grok_op_properties): Add an extra check of argtypes. X-Git-Tag: prereleases/libstdc++-2.92~6805 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34332678dad233a6d4ec0a85e47f6d65397def1c;p=thirdparty%2Fgcc.git * decl.c (grok_op_properties): Add an extra check of argtypes. From-SVN: r33524 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7f96445a2076..42c63fca7a93 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2000-04-28 Cosmin Truta + + * decl.c (grok_op_properties): Add an extra check of argtypes. + 2000-04-28 Jason Merrill * optimize.c (initialize_inlined_parameters): Call diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 78c416719572..deb9e8f3077f 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); + } + } }