From: Pedro Alves Date: Thu, 17 Sep 2020 22:33:41 +0000 (+0100) Subject: gdb.mi/var-cmd.c C++ify X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=81f904895e839b19091832bb83f353d2f4963939;p=binutils-gdb.git gdb.mi/var-cmd.c C++ify This adjusts gdb.mi/var-cmd.c to make it buildable as a C++ program. gdb/testsuite/ChangeLog: * gdb.mi/var-cmd.c (do_anonymous_type_tests): Add cast. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a97ac09c5e0..75a4c2d367c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-09-17 Pedro Alves + + * gdb.mi/var-cmd.c (do_anonymous_type_tests): Add cast. + 2020-09-17 Pedro Alves * gdb.base/exprs.c: Replace 'this' with 'self' throughout. diff --git a/gdb/testsuite/gdb.mi/var-cmd.c b/gdb/testsuite/gdb.mi/var-cmd.c index 0529b67c7f1..f209106dd65 100644 --- a/gdb/testsuite/gdb.mi/var-cmd.c +++ b/gdb/testsuite/gdb.mi/var-cmd.c @@ -566,7 +566,7 @@ do_anonymous_type_tests (void) }; } v = {1, {2}, {3}}; - anon = malloc (sizeof (struct anonymous)); + anon = (struct anonymous *) malloc (sizeof (struct anonymous)); anon->a = 1; anon->b = 2; anon->c = (char *) 3;