FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / dot.C
blob3870eead449e2f5ba570af400488b0b7981960f3
1 // PRMS Id: 4143
2 // Bug: Pointer is silently dereferenced in method call.
3 // Build don't link:
5 extern "C" int printf (const char *, ...);
7 class Test
9     char ch;
10   public:
11     Test(char c) : ch(c) {}
12     void Print() { printf("%c", ch); }
15 int main()
17     Test *p = new Test('x');
19     p.Print();  // ERROR -