From: Pedro Alves Date: Thu, 17 Sep 2020 22:33:43 +0000 (+0100) Subject: gdb.cp/call-c.exp C++ify X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7474326cb9441644313cb749e491bec5e001d236;p=binutils-gdb.git gdb.cp/call-c.exp C++ify Make the testcase work when built with a C++ compiler. gdb/testsuite/ChangeLog: * gdb.cp/call-c-1.c (foo) [__cplusplus]: Add extern "C". --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ded85f23d3b..4034c734c65 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-09-17 Pedro Alves + + * gdb.cp/call-c-1.c (foo) [__cplusplus]: Add extern "C". + 2020-09-17 Pedro Alves * gdb.python/py-frame-inline.exp: Adjust to optionally expect a diff --git a/gdb/testsuite/gdb.cp/call-c-1.c b/gdb/testsuite/gdb.cp/call-c-1.c index 5d3d019672d..fa79f0311bc 100644 --- a/gdb/testsuite/gdb.cp/call-c-1.c +++ b/gdb/testsuite/gdb.cp/call-c-1.c @@ -15,4 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#ifdef __cplusplus +extern "C" +#endif int foo(int x) { return x; }