Patchwork [v3] fix libstdc++/47662

login
register
mail settings
Submitter Jonathan Wakely
Date Feb. 12, 2011, 6:36 p.m.
Message ID <AANLkTikiPRHT=GePGKnxpRxEuA06edqOSeVBW3jE49N3@mail.gmail.com>
Download mbox | patch
Permalink /patch/82942/
State New
Headers show

Comments

Jonathan Wakely - Feb. 12, 2011, 6:36 p.m.
And the C++0x mode test ...

2011-02-12  Jakub Jelinek  <jakub@redhat.com>
            Jonathan Wakely  <jwakely.gcc@gmail.com>

        PR libstdc++/47662
        * testsuite/17_intro/headers/c++200x/operator_names.cc: New.
        * testsuite/17_intro/headers/c++1998/operator_names.cc: Add comment.

tested x86_64-linux, committed to trunk

Patch

Index: testsuite/17_intro/headers/c++1998/operator_names.cc
===================================================================
--- testsuite/17_intro/headers/c++1998/operator_names.cc	(revision 170026)
+++ testsuite/17_intro/headers/c++1998/operator_names.cc	(working copy)
@@ -18,6 +18,8 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
+// libstdc++/47662
+
 // Avoid using PCH
 #include <cerrno>
 #include <bits/stdc++.h>
Index: testsuite/17_intro/headers/c++200x/operator_names.cc
===================================================================
--- testsuite/17_intro/headers/c++200x/operator_names.cc	(revision 0)
+++ testsuite/17_intro/headers/c++200x/operator_names.cc	(revision 0)
@@ -0,0 +1,30 @@ 
+// { dg-do compile }
+// { dg-options "-std=gnu++0x -fno-operator-names" }
+
+// Copyright (C) 2011 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
+// libstdc++/47662
+
+// Avoid using PCH
+#include <cerrno>
+#include <bits/stdc++.h>
+#include <bits/stdtr1c++.h>
+#include <bits/extc++.h>
+
+int or, xor, and;
+