| 1 |
// { dg-do assemble } |
| 2 |
// { dg-options "-fexceptions -pedantic-errors" } |
| 3 |
// prms-id: 6058 |
| 4 |
|
| 5 |
void bar(struct s1 { } a) { (void)a; } // { dg-error "" } |
| 6 |
|
| 7 |
struct s2*fooey() |
| 8 |
{ |
| 9 |
try { |
| 10 |
static_cast<struct s3 { } *>(0); // { dg-error "" } |
| 11 |
const_cast<struct s4 { } *>((s4*)0); // { dg-error "" } |
| 12 |
reinterpret_cast<struct s5 { } *>((s3*)0); // { dg-error "" } |
| 13 |
dynamic_cast<struct s6 { } *>((s6*)0); // { dg-error "" } |
| 14 |
(struct s7 { } *)(int*)0xffedec; // { dg-error "" } |
| 15 |
} catch (struct s8 { } s) { // { dg-error "" } |
| 16 |
} |
| 17 |
return 0; |
| 18 |
} |