bitfld1.C: built-in operator!= should be preferred over template operator!= for enum...
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Fri, 25 Sep 1998 22:57:30 +0000 (22:57 +0000)
committerAlexandre Oliva <oliva@gcc.gnu.org>
Fri, 25 Sep 1998 22:57:30 +0000 (22:57 +0000)
* g++.old-deja/g++.other/bitfld1.C: built-in operator!= should be
preferred over template operator!= for enum bitfields

From-SVN: r22599

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/bitfld1.C [new file with mode: 0644]

index ae4bab7733553bd0491cde44325e34c759f53f76..3a6613a3fefcf101a40afb9028ba220ec7c5656c 100644 (file)
@@ -1,3 +1,8 @@
+1998-09-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * g++.old-deja/g++.other/bitfld1.C: built-in operator!= should be
+       preferred over template operator!= for enum bitfields
+
 1998-09-18  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * g++.old-deja/g++.other/nested2.C: different virtual base classes
diff --git a/gcc/testsuite/g++.old-deja/g++.other/bitfld1.C b/gcc/testsuite/g++.old-deja/g++.other/bitfld1.C
new file mode 100644 (file)
index 0000000..296ee1d
--- /dev/null
@@ -0,0 +1,12 @@
+// Build don't link:
+// Based on a bug report by Stephen Vavasis <vavasis@CS.Cornell.EDU>
+
+// declares template operator!=
+#include <utility>
+
+struct foo {
+  enum e { bar } baz:1;
+  void test() { 
+    baz != bar; // XFAIL *-*-*
+  }
+};