From: Jan Kratochvil Date: Sun, 16 Sep 2012 17:30:48 +0000 (+0000) Subject: gdb/testsuite/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=666b578baa50340a13808a9f4eff0c044de9b52c;p=binutils-gdb.git gdb/testsuite/ Fix compatibility with old GCC (~4.1). * gdb.cp/converts.cc (my_enum_var): New variable. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 7fcf5209cd5..c5da0ccfae0 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-09-16 Jan Kratochvil + + Fix compatibility with old GCC (~4.1). + * gdb.cp/converts.cc (my_enum_var): New variable. + 2012-09-14 Andrew Burgess * gdb.xml/tdesc-regs.exp: Update expected output for new diff --git a/gdb/testsuite/gdb.cp/converts.cc b/gdb/testsuite/gdb.cp/converts.cc index 025123fb33f..309008f8247 100644 --- a/gdb/testsuite/gdb.cp/converts.cc +++ b/gdb/testsuite/gdb.cp/converts.cc @@ -12,6 +12,10 @@ typedef TA2 TA3; enum my_enum {MY_A, MY_B, MY_C, MY_D}; +/* Without this variable older 'enum my_enum' incl. its 'MY_A' would be omitted + by older versions of GCC (~4.1) failing the testcase using it below. */ +enum my_enum my_enum_var; + int foo0_1 (TA1) { return 1; } int foo0_2 (TA3) { return 2; } int foo0_3 (A***) { return 3; }