diff options
author | Pedro Alves <pedro@palves.net> | 2020-09-17 23:33:41 +0100 |
---|---|---|
committer | Pedro Alves <pedro@palves.net> | 2020-09-18 00:05:10 +0100 |
commit | 18a25b648176c70a651dc869394eef2d26d50723 (patch) | |
tree | 169f416ade616823ff1025633fa6d19112dd4dbb /gdb/testsuite | |
parent | 11fac33796f43a177c1836bf8fb1f7cc60e3875e (diff) | |
download | gdb-18a25b648176c70a651dc869394eef2d26d50723.zip gdb-18a25b648176c70a651dc869394eef2d26d50723.tar.gz gdb-18a25b648176c70a651dc869394eef2d26d50723.tar.bz2 |
gdb.base/printcmds.c C++-ify
Adjust gdb.base/printcmds.c to make it buildable as a C++ program.
gdb/testsuite/ChangeLog:
* gdb.base/printcmds.c (three, flag_enum_without_zero)
(three_not_flag): Add casts.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/printcmds.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index aee673f..7b424b5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2020-09-17 Pedro Alves <pedro@palves.net> + * gdb.base/printcmds.c (three, flag_enum_without_zero) + (three_not_flag): Add casts. + +2020-09-17 Pedro Alves <pedro@palves.net> + * gdb.base/examine-backward.c (Barrier, TestStrings): Now unsigned char array. (main): Add references to Barrier, TestStrings, TestStringsH and diff --git a/gdb/testsuite/gdb.base/printcmds.c b/gdb/testsuite/gdb.base/printcmds.c index 04b766f..9af6bf3 100644 --- a/gdb/testsuite/gdb.base/printcmds.c +++ b/gdb/testsuite/gdb.base/printcmds.c @@ -108,7 +108,7 @@ enum flag_enum FE_TWO_LEGACY = 0x02, }; -enum flag_enum three = FE_ONE | FE_TWO; +enum flag_enum three = (enum flag_enum) (FE_ONE | FE_TWO); /* Another enum considered as a "flag enum", but with no enumerator with value 0. */ @@ -118,7 +118,7 @@ enum flag_enum_without_zero FEWZ_TWO = 0x02, }; -enum flag_enum_without_zero flag_enum_without_zero = 0; +enum flag_enum_without_zero flag_enum_without_zero = (enum flag_enum_without_zero) 0; /* Not a flag enum, an enumerator value has multiple bits sets. */ enum not_flag_enum @@ -128,7 +128,7 @@ enum not_flag_enum NFE_F0 = 0xf0, }; -enum not_flag_enum three_not_flag = NFE_ONE | NFE_TWO; +enum not_flag_enum three_not_flag = (enum not_flag_enum) (NFE_ONE | NFE_TWO); /* A structure with an embedded array at an offset > 0. The array has all elements with the same repeating value, which must not be the |