aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/cvt20.C
blob: 9389a107ff7fc0ff0a2dd94bda56cf90cf31c07a (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 conversions
// cvt file
// Message-Id: <9307152250.AA24812@volterra>
// From: rst@ai.mit.edu (Robert S. Thau)
// Subject: g++ won't convert char[] to char*&
// Date: Thu, 15 Jul 93 18:50:59 EDT


// Compiles fine with Sun CC 2.1

void f(char *& x) // { dg-message "passing argument" }
{
  x++;
}

int main()
{
  f ("foo"); // { dg-error "invalid initialization" }
}