This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Testsuite regression gdb.cp/converts.exp [Re: [RFA] gdb/13483]


On 09/12/2012 12:58 PM, Jan Kratochvil wrote:
Yes, I agree.  Although rather to replace it in .c by an explanatory comment
like

/* .exp file contains line
      gdb_test "p foo1_7(&foo1_7)" " = 17"
    which is not compiled here for verification as older GCCs (~4.1) fail the
    compilation due to:
      warning: the address of 'int foo1_7(bool)', will always evaluate as 'true'
    */

Sure. For the record, here is what I committed:


2012-09-12 Keith Seitz <keiths@redhat.com>

	* gdb.cp/converts.cc (main): Comment out the pointer to boolean
	conversion statement.

Index: gdb.cp/converts.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/converts.cc,v
retrieving revision 1.5
diff -u -p -r1.5 converts.cc
--- gdb.cp/converts.cc 10 Sep 2012 17:12:52 -0000 1.5
+++ gdb.cp/converts.cc 12 Sep 2012 23:27:03 -0000
@@ -78,7 +78,15 @@ int main()
foo1_7 (long_int); // long to boolean
foo1_7 (*a); // char to boolean
foo1_7 (MY_A); // unscoped enum to boolean
+ /* converts.exp tests the next statement directly. It is not compiled
+ here for verification because older versions of GCC (~4.1) fail to
+ compile it:
+
+ warning: the address of 'int foo1_7(bool)' will always evaluate as true
+
foo1_7 (&foo1_7); // pointer to boolean
+ */
+
foo1_7 (&A::member_); // pointer to member to boolean
foo1_7 (a); // pointer to boolean
foo1_7 (fp); // float to boolean


Keith


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]