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
Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
p701.C
blob
99ef1f4d6c85459f79d9c6512444532898501823
1
// { dg-do assemble }
2
// prms-id: 701
3
4
extern "C"
5
{
6
int printf(const char *, ...);
7
}
8
9
10
void Munge(int& x) // { dg-message "argument 1" }
11
{
12
x = 2;
13
}
14
15
16
class A
17
{
18
public:
19
int i;
20
A(int x) : i(x) {}
21
void Safe() const;
22
};
23
24
void
25
A::Safe() const
26
{
27
Munge(i); // { dg-error "const" }
28
}
29
30
int main()
31
{
32
const A a(1);
33
a.Safe();
34
}