repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
FSF GCC merge 02/23/03
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.jason
/
dot.C
blob
3870eead449e2f5ba570af400488b0b7981960f3
1
// PRMS Id: 4143
2
// Bug: Pointer is silently dereferenced in method call.
3
// Build don't link:
4
5
extern "C" int printf (const char *, ...);
6
7
class Test
8
{
9
char ch;
10
public:
11
Test(char c) : ch(c) {}
12
void Print() { printf("%c", ch); }
13
};
14
15
int main()
16
{
17
Test *p = new Test('x');
18
19
p.Print(); // ERROR -
20
}