2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / net8.C
blob09dfe1a83b7c4e10c4c7807a2ea8058dff361823
1 // { dg-do assemble  }
2 // { dg-options "-pedantic-errors" }
4 class Base {
5 public:
6   int foo;
7 };
9 class Derived : public Base {
10 public:
11   int bar;
14 void func(Base&);               // { dg-error "" } 
16 void func2(const Derived& d) {
17   func(d);                      // { dg-error "" } this is bad
20 void
21 foo (int& a)
22 {                               // { dg-error "" } 
25 int main ()
27   int b;
28   const int*const a = &b;
29   *a = 10;                              // { dg-error "" } it's const
30   foo (*a);                             // { dg-error "" } it's const
31   return 0;