This is the mail archive of the gdb-patches@sources.redhat.com 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]

[patch/testsuite/cp] inherit.exp: accept both "ctor()" and "ctor(void)"


This patch improves inherit.exp to accept both "ctor()" and "ctor(void)"
for synthetic ctor's with gcc v3.  gdb HEAD prints "ctor()", and
gdb drow-cplus-branch prints "ctor(void)".

I tested this with:

  native i686-pc-linux-gnu
  gdb HEAD, gdb carlton_dictionary-branch, gdb drow-cplus-branch
  gcc 2.95.3, gcc 3.3.2, gcc HEAD
  dwarf-2, stabs+

IACTN,

Michael C

2004-02-03  Michael Chastain  <mec.gnu@mindspring.com>

	* gdb.cp/inherit.exp: Accept both "ctor()" and "ctor(void)".

Index: inherit.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/inherit.exp,v
retrieving revision 1.3
diff -c -3 -p -r1.3 inherit.exp
*** inherit.exp	4 Feb 2004 02:01:17 -0000	1.3
--- inherit.exp	4 Feb 2004 03:51:06 -0000
*************** proc test_ptype_vi { } {
*** 351,357 ****
      set re_access	"public:"
      set re_fields	"int vb;${ws}int vx;"
      set re_synth_gcc_2	"vB & operator=\\(vB const ?&\\);${ws}vB\\(int, vB const ?&\\);${ws}vB\\(int\\);"
!     set re_synth_gcc_3	"vB & operator=\\(vB const ?&\\);${ws}vB\\(vB const ?&\\);${ws}vB\\(\\);"
  
      set name "ptype vB"
      gdb_test_multiple "ptype vB" $name {
--- 351,357 ----
      set re_access	"public:"
      set re_fields	"int vb;${ws}int vx;"
      set re_synth_gcc_2	"vB & operator=\\(vB const ?&\\);${ws}vB\\(int, vB const ?&\\);${ws}vB\\(int\\);"
!     set re_synth_gcc_3	"vB & operator=\\(vB const ?&\\);${ws}vB\\(vB const ?&\\);${ws}vB\\((void|)\\);"
  
      set name "ptype vB"
      gdb_test_multiple "ptype vB" $name {
*************** proc test_ptype_vi { } {
*** 426,432 ****
      set re_access	"public:"
      set re_fields	"int vc;${ws}int vx;"
      set re_synth_gcc_2	"vC & operator=\\(vC const ?&\\);${ws}vC\\(int, vC const ?&\\);${ws}vC\\(int\\);"
!     set re_synth_gcc_3	"vC & operator=\\(vC const ?&\\);${ws}vC\\(vC const ?&\\);${ws}vC\\(\\);"
  
      set name "ptype vC"
      gdb_test_multiple "ptype vC" $name {
--- 426,432 ----
      set re_access	"public:"
      set re_fields	"int vc;${ws}int vx;"
      set re_synth_gcc_2	"vC & operator=\\(vC const ?&\\);${ws}vC\\(int, vC const ?&\\);${ws}vC\\(int\\);"
!     set re_synth_gcc_3	"vC & operator=\\(vC const ?&\\);${ws}vC\\(vC const ?&\\);${ws}vC\\((void|)\\);"
  
      set name "ptype vC"
      gdb_test_multiple "ptype vC" $name {
*************** proc test_ptype_mvi { } {
*** 509,515 ****
      set re_access	"public:"
      set re_fields	"int vd;${ws}int vx;"
      set re_synth_gcc_2	"vD & operator=\\(vD const ?&\\);${ws}vD\\(int, vD const ?&\\);${ws}vD\\(int\\);"
!     set re_synth_gcc_3	"vD & operator=\\(vD const ?&\\);${ws}vD\\(vD const ?&\\);${ws}vD\\(\\);"
  
      set name "ptype vD"
      gdb_test_multiple "ptype vD" $name {
--- 509,515 ----
      set re_access	"public:"
      set re_fields	"int vd;${ws}int vx;"
      set re_synth_gcc_2	"vD & operator=\\(vD const ?&\\);${ws}vD\\(int, vD const ?&\\);${ws}vD\\(int\\);"
!     set re_synth_gcc_3	"vD & operator=\\(vD const ?&\\);${ws}vD\\(vD const ?&\\);${ws}vD\\((void|)\\);"
  
      set name "ptype vD"
      gdb_test_multiple "ptype vD" $name {
*************** proc test_ptype_mvi { } {
*** 584,590 ****
      set re_access	"public:"
      set re_fields	"int ve;${ws}int vx;"
      set re_synth_gcc_2	"vE & operator=\\(vE const ?&\\);${ws}vE\\(int, vE const ?&\\);${ws}vE\\(int\\);"
!     set re_synth_gcc_3	"vE & operator=\\(vE const ?&\\);${ws}vE\\(vE const ?&\\);${ws}vE\\(\\);"
  
      set name "ptype vE"
      gdb_test_multiple "ptype vE" $name {
--- 584,590 ----
      set re_access	"public:"
      set re_fields	"int ve;${ws}int vx;"
      set re_synth_gcc_2	"vE & operator=\\(vE const ?&\\);${ws}vE\\(int, vE const ?&\\);${ws}vE\\(int\\);"
!     set re_synth_gcc_3	"vE & operator=\\(vE const ?&\\);${ws}vE\\(vE const ?&\\);${ws}vE\\((void|)\\);"
  
      set name "ptype vE"
      gdb_test_multiple "ptype vE" $name {


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