OSDN Git Service

Another round of improvements from Martin.
authorrobertl <robertl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Jun 1998 08:24:42 +0000 (08:24 +0000)
committerrobertl <robertl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Jun 1998 08:24:42 +0000 (08:24 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20166 138bc75d-0d04-0410-961f-82ee72b054a4

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 553d4e2..307aa6a 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 acd336d..fd953fe 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 79b153e..0e85591 100644 (file)
@@ -1,3 +1,5 @@
+//Special g++ Options:
+//This uses GNU extensions, so disable -ansi
 #include <stdio.h>
 
 class A {
index 4b66c11..45cdedd 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 5e4dacb..c5ca469 100644 (file)
@@ -18,7 +18,7 @@ friend class   D;
 class   D {
 
   int                   ins( B*&);
-};
+};                    //WARNING - only private members
 
 int
 D::ins( B*& tempN)
index 0d352dd..446a9e0 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 c7619b3..213bb6d 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 3c85dc3..1e4d8c6 100644 (file)
@@ -2,7 +2,7 @@
 
 template <int n1>
 double val <int> ()
-{
+{                          // ERROR - bogus code
    return (double) n1;
 };
 
index 5147e8c..eee6ff6 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 c08ec42..8cb1639 100644 (file)
@@ -1 +1 @@
-template<int N> f<0>(){}
+template<int N> f<0>(){}  // ERROR - invalid code
index e05177b..988e65d 100644 (file)
@@ -26,5 +26,5 @@ inline double Sine()
 int main()
 {
   double f=Sine<32,5>()
-  return 0;
+  return 0;               // ERROR - parse error
 }
index a40eafb..7f7c0b4 100644 (file)
@@ -12,4 +12,4 @@ private:
 static int variable;                    // this is intentionally duplicated
 };
 
-myClass::variable = 0;
+myClass::variable = 0;                  //ERROR - no type
index 2e86824..cc19f09 100644 (file)
@@ -13,5 +13,5 @@
 
     void f()
     {
-            extent(b);
+      extent(b);  // ERROR - no matching function
     }
index a5f8624..4cced8b 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
 }