[testsuite,committed] Allow any size enum in gdb.cp/var-tag.exp
Commit Message
I found that the C++ enum tests that allow a base type specifier in
gdb.cp/var-tag.log were failing on arm-none-eabi. The problem was that
the regexp it was matching against only allowed for int type, while the
C++ standard allows the representation to be any integer type that is
big enough to hold all the values of the enumeration. On ARM the AAPCS
allows the use of types smaller than an int, and GCC defaults to
-fshort-enums on arm-none-eabi.
I've checked in this tweak to the regexp as an obvious fix, after
verifying that it PASSes both on arm-none-eabi and a target where it
already used to work (nios2-linux-gnu).
-Sandra
@@ -30,7 +30,7 @@ proc do_global_tests {lang} {
set invalid_print "Attempt to use a type name as an expression"
if {$lang == "c++"} {
- set opt_underlying "(: unsigned int )?"
+ set opt_underlying "(: unsigned (int|short|char) )?"
} else {
set opt_underlying ""
}