summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/temps1.C
blob: bd344b4190c3e5d32b470b34470b33627f0e40d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do assemble  }
// GROUPS passed temps
// temps file
// Date: Mon, 07 Sep 1992 13:12:28 EDT
// From: richard@ttt.kth.se 
// { dg-options "-fpermissive" }
struct foo
{
  char *s;
  foo(char *x) { s=x; }
};

struct cookie
{
  foo * v;
  cookie ( foo * x) { v=x; }
};

cookie cat(&foo("apabepa"));// { dg-warning "deprecated conversion" "dep" }
// { dg-warning "taking address of temporary" "add" { target *-*-* } 19 }