gcc/testsuite/g++.old-deja/g++.law/typeck2.C
raw| 1 | // { dg-do assemble } |
| 2 | // GROUPS passed typeck |
| 3 | // typeck file |
| 4 | // From: Jutta Degener <[email protected]> |
| 5 | // Date: Wed, 9 Jun 1993 17:58:35 +0200 (MET DST) |
| 6 | // Subject: 2.4.3: Type of new <typedef'ed array> |
| 7 | // Message-ID: <[email protected]> |
| 8 | |
| 9 | typedef int arr[10]; |
| 10 | int main() |
| 11 | { |
| 12 | int * p = new int[10]; |
| 13 | int * q = new arr; /* g++ complains, but shouldn't */ |
| 14 | int (* r)[10] = new arr; /* g++ doesn't complain, but should */// { dg-error "" } |
| 15 | } |
| 16 |