gcc/testsuite/g++.old-deja/g++.law/temps1.C
raw| 1 | // { dg-do assemble } |
| 2 | // GROUPS passed temps |
| 3 | // temps file |
| 4 | // Date: Mon, 07 Sep 1992 13:12:28 EDT |
| 5 | // From: [email protected] |
| 6 | // { dg-options "-fpermissive" } |
| 7 | struct foo |
| 8 | { |
| 9 | char *s; |
| 10 | foo(char *x) { s=x; } |
| 11 | }; |
| 12 | |
| 13 | struct cookie |
| 14 | { |
| 15 | foo * v; |
| 16 | cookie ( foo * x) { v=x; } |
| 17 | }; |
| 18 | |
| 19 | cookie cat(&foo("apabepa"));// { dg-warning "deprecated conversion|forbids converting a string constant" "dep" } |
| 20 | // { dg-warning "13:taking address of rvalue" "add" { target *-*-* } .-1 } |