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

Message ID 1587391712-8712-1-git-send-email-gbenson@redhat.com
State New
Headers show
Series
  • [OB] Fix compilation error with clang in gdb/testsuite/gdb.cp/exception.cc
Related show

Commit Message

Rogerio Alves via Gdb-patches April 20, 2020, 2:08 p.m.
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(-)

-- 
1.8.3.1

Patch

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)