This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
GDB produces unnecessary warnings
- To: Stan Shebs <shebs@cygnus.com>
- Subject: GDB produces unnecessary warnings
- From: Jim Blandy <jimb@cygnus.com>
- Date: Mon, 28 Jun 1999 15:04:41 -0500 (EST)
- CC: gdb-patches@sourceware.cygnus.com
I'm not sure how worthwhile this is, since the code that produced the
warnings is now gone from GDB, with David Taylor's change of Mar 31.
But if you think it's interesting, I'll commit it.
1999-06-28 Jim Blandy <jimb@zwingli.cygnus.com>
* gdb.c++/derivation.exp ("print g_instance.a", "print
g_instance.b", "print g_instance.c"): Fail if the debugger
produces a warning. The compiler thinks these expressions are
fine, so GDB should too.
Index: derivation.exp
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/testsuite/gdb.c++/derivation.exp,v
retrieving revision 1.3
diff -c -r1.3 derivation.exp
*** derivation.exp 1999/04/02 02:22:42 1.3
--- derivation.exp 1999/06/28 20:00:52
***************
*** 1,4 ****
! # Copyright (C) 1998 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--- 1,4 ----
! # Copyright (C) 1998, 1999 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
***************
*** 265,270 ****
--- 265,274 ----
send_gdb "print g_instance.a\n"
gdb_expect {
+ -re "warning.*$gdb_prompt $" {
+ # The compiler doesn't think this is ambiguous.
+ fail "print value of g_instance.a"
+ }
-re ".\[0-9\]* = 15.*$gdb_prompt $" {
pass "print value of g_instance.a"
}
***************
*** 274,279 ****
--- 278,287 ----
send_gdb "print g_instance.b\n"
gdb_expect {
+ -re "warning.*$gdb_prompt $" {
+ # The compiler doesn't think this is ambiguous.
+ fail "print value of g_instance.b"
+ }
-re ".\[0-9\]* = 16.*$gdb_prompt $" {
pass "print value of g_instance.b"
}
***************
*** 283,288 ****
--- 291,300 ----
send_gdb "print g_instance.c\n"
gdb_expect {
+ -re "warning.*$gdb_prompt $" {
+ # The compiler doesn't think this is ambiguous.
+ fail "print value of g_instance.c"
+ }
-re ".\[0-9\]* = 17.*$gdb_prompt $" {
pass "print value of g_instance.c"
}