This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] gdb.cp/overload.cc: add cast to prevent compiler warning
- From: Michael Snyder <msnyder at vmware dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Mon, 28 Feb 2011 10:02:49 -0800
- Subject: Re: [RFA] gdb.cp/overload.cc: add cast to prevent compiler warning
- References: <4D6ABBFF.5030401@vmware.com> <20110228050102.GE30306@adacore.com>
Joel Brobecker wrote:
2011-02-27 Michael Snyder <msnyder@vmware.com>
* gdb.cp/overload.cc: Add cast to prevent compiler warning.
Index: gdb.cp/overload.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/overload.cc,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 overload.cc
--- gdb.cp/overload.cc 4 Nov 2010 20:43:25 -0000 1.7
+++ gdb.cp/overload.cc 27 Feb 2011 21:00:47 -0000
@@ -110,7 +110,7 @@ int main ()
unsigned long arg10 =10;
float arg11 =100.0;
double arg12 = 200.0;
- int arg13 = 200.0;
+ int arg13 = (int) 200.0;
Why not just write this as:
int arg13 = 200;
I don't know -- I dunno what the author's intention was.