]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb.cp/call-c.exp C++ify
authorPedro Alves <pedro@palves.net>
Thu, 17 Sep 2020 22:33:43 +0000 (23:33 +0100)
committerPedro Alves <pedro@palves.net>
Thu, 17 Sep 2020 23:09:20 +0000 (00:09 +0100)
Make the testcase work when built with a C++ compiler.

gdb/testsuite/ChangeLog:

* gdb.cp/call-c-1.c (foo) [__cplusplus]: Add extern "C".

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/call-c-1.c

index ded85f23d3bcf5927ef0dd4a0d4149c4db28a900..4034c734c65bfece009482404ae1d7007902ed80 100644 (file)
@@ -1,3 +1,7 @@
+2020-09-17  Pedro Alves  <pedro@palves.net>
+
+       * gdb.cp/call-c-1.c (foo) [__cplusplus]: Add extern "C".
+
 2020-09-17  Pedro Alves  <pedro@palves.net>
 
        * gdb.python/py-frame-inline.exp: Adjust to optionally expect a
index 5d3d019672d218943bf50f5f93ec8911f2bd0589..fa79f0311bc7bfc6d83b4ea25b47ad6408ad144e 100644 (file)
@@ -15,4 +15,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#ifdef __cplusplus
+extern "C"
+#endif
 int foo(int x) { return x; }