Another round of improvements from Martin.
authorRobert Lipe <robertl@gcc.gnu.org>
Mon, 1 Jun 1998 08:24:42 +0000 (08:24 +0000)
committerRobert Lipe <robertl@gcc.gnu.org>
Mon, 1 Jun 1998 08:24:42 +0000 (08:24 +0000)
From-SVN: r20166

14 files changed:
gcc/testsuite/g++.old-deja/g++.robertl/eb11.C
gcc/testsuite/g++.old-deja/g++.robertl/eb18.C
gcc/testsuite/g++.old-deja/g++.robertl/eb63.C
gcc/testsuite/g++.old-deja/g++.robertl/eb67.C
gcc/testsuite/g++.old-deja/g++.robertl/eb71.C
gcc/testsuite/g++.old-deja/g++.robertl/eb76.C
gcc/testsuite/g++.old-deja/g++.robertl/eb8.C
gcc/testsuite/g++.old-deja/g++.robertl/eb82.C
gcc/testsuite/g++.old-deja/g++.robertl/eb87.C
gcc/testsuite/g++.old-deja/g++.robertl/eb92.C
gcc/testsuite/g++.old-deja/g++.robertl/eb93.C
gcc/testsuite/g++.old-deja/g++.robertl/eb94.C
gcc/testsuite/g++.old-deja/g++.robertl/eb98.C
gcc/testsuite/g++.old-deja/g++.robertl/eb99.C

index 553d4e2ff21db3a3402d26e146fc249634f89c76..307aa6a95687036a8517c2b2ccc098b2e1e7b0f1 100644 (file)
@@ -1,12 +1,9 @@
 // Build don't link:
 
-#define NO_META_MAX
-#ifndef NO_META_MAX
 template<int N1, int N2>
 struct meta_max {
     enum { max = (N1 > N2) ? N1 : N2 };
 };
-#endif
 
 struct X {
     enum {
index acd336d403780993a1ae49686b435b0359da7e67..fd953fe07103221b29e2c522701ad03f25b9153d 100644 (file)
@@ -4,5 +4,5 @@ class C { };
 void foo()
 {
     C c;
-    void * v = static_cast<void *>(c);
+    void * v = static_cast<void *>(c);  // ERROR - illegal cast
 }
index 79b153eb9bd9e26628d46d1e8702015775a9fcda..0e8559124d62326c372a27eacd60238a7f25e063 100644 (file)
@@ -1,3 +1,5 @@
+//Special g++ Options:
+//This uses GNU extensions, so disable -ansi
 #include <stdio.h>
 
 class A {
index 4b66c118c82b3a7b66473ae91ae816172e9a1582..45cdedd995ca5d0388b623031da5df53daf0fbf3 100644 (file)
@@ -1,6 +1,6 @@
 // Build don't link: 
-/* 
+/*
 Check whether a typedef for a basic type as a baseclass is diagnosed.
 */
 typedef int an_int;
-class bar : public an_int {}; // ERROR -
+class bar : public an_int {}; // ERROR - not an aggregate 
index 5e4dacba518fd58d5a03e98438421b249b27e83d..c5ca4697838790c68aeba067a20f33975c2c8886 100644 (file)
@@ -18,7 +18,7 @@ friend class   D;
 class   D {
 
   int                   ins( B*&);
-};
+};                    //WARNING - only private members
 
 int
 D::ins( B*& tempN)
index 0d352dd416dbb5188fee0966262c02e448568150..446a9e06a00bc6a5671336852b5a6ec43c5c60f4 100644 (file)
@@ -7,7 +7,7 @@ inline bool operator!=(const T& x, const T& y) {
 
 enum T {
   V1,
-};                           // ERROR -
+};                           //ERROR - comma at end of enumerator list
 
 struct X {
   T      t : 31;
index c7619b3fa8d317768aab3f710d6672106db48946..213bb6de90be4b6719119223b39d429fdc54c685 100644 (file)
@@ -1,12 +1,12 @@
 
 class foo {
 public:
-  operator <<(const void *);
-  operator <<(char *);
+  operator <<(const void *);  //ERROR - no return type
+  operator <<(char *);        //ERROR - no return type
 };
 
 void main()
-{
+{                             //ERROR - wrong return type for main
   foo f;
   f << (void*)0;
 }
index 3c85dc3b7e977f22073cc246b41c83863c48c41f..1e4d8c6249c2985ba89095b6ed5ecd8ab4ce7e1a 100644 (file)
@@ -2,7 +2,7 @@
 
 template <int n1>
 double val <int> ()
-{
+{                          // ERROR - bogus code
    return (double) n1;
 };
 
index 5147e8cc2521456d75f9c33394bd53c9d3dc5c81..eee6ff67a75dad718ff32dc6bb8224e2ba6b9b81 100644 (file)
@@ -2,5 +2,5 @@ template <unsigned X, class T> struct Foo {
   friend void operator<<(int, Foo const &) {}
 };
 template <unsigned X> class Bar : public Foo<X,int> {};
-inline Bar<0> bar(int,int,int) { return Bar<3>(); }
+inline Bar<0> bar(int,int,int) { return Bar<3>(); }  // ERROR - no conversion
 
index c08ec42735180cecccd82575be32f78407bdce5b..8cb1639323c489921232f48a30c8e48020d88534 100644 (file)
@@ -1 +1 @@
-template<int N> f<0>(){}
+template<int N> f<0>(){}  // ERROR - invalid code
index e05177b66907c447629ff1397fd7112960373b1d..988e65d7321729b52d85cc61cb1deba6a55edc04 100644 (file)
@@ -26,5 +26,5 @@ inline double Sine()
 int main()
 {
   double f=Sine<32,5>()
-  return 0;
+  return 0;               // ERROR - parse error
 }
index a40eafb3719f959f7c38316a1d48ac37e6a8dd34..7f7c0b4e8eb2fc383ad25d8701f476658e393c35 100644 (file)
@@ -12,4 +12,4 @@ private:
 static int variable;                    // this is intentionally duplicated
 };
 
-myClass::variable = 0;
+myClass::variable = 0;                  //ERROR - no type
index 2e868240985405ccc6228840ed93289244647b8b..cc19f0997cd8988b42bb6a7d9cfe0e135b0d8baa 100644 (file)
@@ -13,5 +13,5 @@
 
     void f()
     {
-            extent(b);
+      extent(b);  // ERROR - no matching function
     }
index a5f862429e278012aa943e1312831a695fded363..4cced8b0a09800929c8f12adc026a42b6970fe62 100644 (file)
@@ -128,7 +128,7 @@ class Baz : public ref_counted {
 
 class Bar;
 
-void main() {
+int main() {
   ref_ptr<Baz> foo;
-  static_cast<Bar *> (foo)->DoSomething;
+  static_cast<Bar *> (foo)->DoSomething;  //ERROR - invalid cast
 }