diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 872ad4f4113..9fd36c950a6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2002-02-17 Craig Rodrigues + + PR c++/5685 + * decl.c (duplicate_decls): Make warning unconditional + if duplicate default argument declarations are present. + 2002-02-17 Jakub Jelinek * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 697120a3091..bd5bdc26b04 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3389,13 +3389,10 @@ duplicate_decls (newdecl, olddecl) if (1 == simple_cst_equal (TREE_PURPOSE (t1), TREE_PURPOSE (t2))) { - if (pedantic) - { - pedwarn ("default argument given for parameter %d of `%#D'", - i, newdecl); - cp_pedwarn_at ("after previous specification in `%#D'", - olddecl); - } + pedwarn ("default argument given for parameter %d of `%#D'", + i, newdecl); + cp_pedwarn_at ("after previous specification in `%#D'", + olddecl); } else {