This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
"Obvious" change in cp/decl.c
- From: Matt Austern <austern at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 1 Oct 2002 16:23:23 -0700
- Subject: "Obvious" change in cp/decl.c
I claim that this is an obvious patch:
Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.939
diff -u -r1.939 decl.c
--- decl.c 1 Oct 2002 18:27:53 -0000 1.939
+++ decl.c 1 Oct 2002 23:18:06 -0000
@@ -1793,7 +1793,7 @@
int result = 0;
for (; decl ; decl = TREE_CHAIN (decl))
- result != (*f) (&decl, d);
+ result |= (*f) (&decl, d);
return result;
}
Any disagreement?
As it stands, 'result' can never get set to a nonzero value. I
don't have a test case showing that this causes a user-visible
bug, but I could probably find one. It would probably involve
something like a class template with several virtual member
functions, where explicitly instantiating the key function doesn't
trigger instantiation of the other virtual member functions.
--Matt