aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/p701.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.mike/p701.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p701.C35
1 files changed, 1 insertions, 34 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p701.C b/gcc/testsuite/g++.old-deja/g++.mike/p701.C
index 4acf17038d4..29b55ae70ac 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p701.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p701.C
@@ -1,34 +1 @@
-// Build don't link:
-// prms-id: 701
-
-extern "C"
-{
- int printf(const char *, ...);
-};
-
-
-void Munge(int& x)
-{ // ERROR - referenced below
- x = 2;
-}
-
-
-class A
-{
- public:
- int i;
- A(int x) : i(x) {}
- void Safe() const;
-};
-
-void
-A::Safe() const
-{
- Munge(i); // ERROR - should not be able to modify a const object
-}
-
-main()
-{
- const A a(1);
- a.Safe();
-}
+int main()