This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH RFA] testsuite/gdb.c++/templates.cc printf() patch
On Jan 29, 11:12pm, Fernando Nasser wrote:
> > > I have no problem with changing the definition from "void" to "int"
> > > as long as it exists though.
> >
> > I'll leave it to the testsuite maintainers to decide whether it would
> > be better to change the printf() declarator or remove the printf()
> > definition altogether.
> >
>
> Leaving it there without knowing why does not make sense.
>
> Scrap it.
Okay. It's gone. I've appended the patch that I used to "scrap it"
below. Note that there are now a number of blank lines where the
printf() definition used to be. I did it that way because it appears
that there's at least one place in gdb.c++/templates.exp which depends
on an exact (later) line number. (Search for "b 770".) I think this
is the only occurrence that would need to be fixed if the lines were
actually removed, but I wasn't absolutely sure. Also, the testsuite
results didn't change regardless of whether I blanked or deleted the
printf() lines, which made me even more reluctant to delete them.
(I would've felt better about it if the results would've changed when
I deleted the lines and then changed back again when I adjusted the
templates.exp code. But since I couldn't get that to happen, I chose
the more conservative course of action.)
2001-01-30 Kevin Buettner <kevinb@redhat.com>
* gdb.c++/templates.cc (printf): Remove unused function definition.
Index: gdb.c++/templates.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/templates.cc,v
retrieving revision 1.3
diff -u -p -r1.3 templates.cc
--- templates.cc 2000/06/05 20:47:28 1.3
+++ templates.cc 2001/01/30 16:41:07
@@ -283,10 +283,10 @@ void h(long double = 4.33e33)
{ }
#endif
*/
-void printf(const char *format, ... )
-{
- // elipsis
-}
+
+
+
+
class T1 {
public: