[PATCH RFA] testsuite/gdb.c++/templates.cc printf() patch

Kevin Buettner kevinb@cygnus.com
Tue Jan 30 14:25:00 GMT 2001


On Jan 30,  1:54pm, Andrew Cagney wrote:

> > 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.)
> 
> Those lines should probably mention that they are intentionally left
> blank....

But then they're no longer blank.  :-)

You do have a point, however.  I've just committed the patch below. 
There was no ChangeLog entry since the entry from earlier today covers
this change as well.

The maintainer(s) of this file ought to probably clean up the cruft
someday, both the comment that I just added as well as the commented
out code above my comment someday and update templates.exp at the same
time.  Again, I think there's only one change that needs to be made to
templates.exp, but I'd want to study it a while first before making
such a change.

Index: gdb.c++/templates.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/templates.cc,v
retrieving revision 1.4
diff -u -p -r1.4 templates.cc
--- templates.cc	2001/01/30 16:45:23	1.4
+++ templates.cc	2001/01/30 22:15:17
@@ -284,9 +284,9 @@ void h(long double = 4.33e33)
 #endif
 */
 
-
-
-
+/* An unneeded printf() definition - actually, just a stub - used to occupy
+   this space.  It has been removed and replaced with this comment which
+   exists to occupy some lines so that templates.exp won't need adjustment.  */
 
 class T1 {
 public:



More information about the Gdb-patches mailing list