[OB PATCH] Fix compilation error with clang in gdb/testsuite/gdb.cp/exception.cc

Gary Benson gbenson@redhat.com
Mon Apr 20 14:08:32 GMT 2020


Clang fails to compile the above file, with the following error:
  warning: using directive refers to implicitly-defined namespace 'std'

This prevents the following testcase from executing:
  gdb.cp/exception.exp
---
 gdb/testsuite/ChangeLog           | 4 ++++
 gdb/testsuite/gdb.cp/exception.cc | 2 --
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.cp/exception.cc b/gdb/testsuite/gdb.cp/exception.cc
index 034c9dc..813c160 100644
--- a/gdb/testsuite/gdb.cp/exception.cc
+++ b/gdb/testsuite/gdb.cp/exception.cc
@@ -17,8 +17,6 @@
 
 // Test file for exception handling support.
 
-using namespace std;
-
 int foo (int i)
 {
   if (i < 32)
-- 
1.8.3.1



More information about the Gdb-patches mailing list