diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/cast-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/cast-1.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/testsuite/gcc.dg/cast-1.c b/gcc/testsuite/gcc.dg/cast-1.c index 892426467f1..7b12ad9f561 100644 --- a/gcc/testsuite/gcc.dg/cast-1.c +++ b/gcc/testsuite/gcc.dg/cast-1.c @@ -15,27 +15,27 @@ float fv; void f (void) { - (int []) p; /* { dg-error "error: cast specifies array type" } */ - (int ()) p; /* { dg-error "error: cast specifies function type" } */ + (int []) p; /* { dg-error "cast specifies array type" } */ + (int ()) p; /* { dg-error "cast specifies function type" } */ (struct s) sv; (union u) uv; - (struct s) i; /* { dg-error "error: conversion to non-scalar type requested" } */ + (struct s) i; /* { dg-error "conversion to non-scalar type requested" } */ (union u) i; - (union u) l; /* { dg-error "error: cast to union type from type not present in union" } */ - (int) sv; /* { dg-error "error: aggregate value used where an integer was expected" } */ - (int) uv; /* { dg-error "error: aggregate value used where an integer was expected" } */ - (float) sv; /* { dg-error "error: aggregate value used where a float was expected" } */ - (float) uv; /* { dg-error "error: aggregate value used where a float was expected" } */ - (_Complex double) sv; /* { dg-error "error: aggregate value used where a complex was expected" } */ - (_Complex double) uv; /* { dg-error "error: aggregate value used where a complex was expected" } */ - (void *) sv; /* { dg-error "error: cannot convert to a pointer type" } */ - (void *) uv; /* { dg-error "error: cannot convert to a pointer type" } */ - (_Bool) sv; /* { dg-error "error: used struct type value where scalar is required" } */ - (_Bool) uv; /* { dg-error "error: used union type value where scalar is required" } */ + (union u) l; /* { dg-error "cast to union type from type not present in union" } */ + (int) sv; /* { dg-error "aggregate value used where an integer was expected" } */ + (int) uv; /* { dg-error "aggregate value used where an integer was expected" } */ + (float) sv; /* { dg-error "aggregate value used where a float was expected" } */ + (float) uv; /* { dg-error "aggregate value used where a float was expected" } */ + (_Complex double) sv; /* { dg-error "aggregate value used where a complex was expected" } */ + (_Complex double) uv; /* { dg-error "aggregate value used where a complex was expected" } */ + (void *) sv; /* { dg-error "cannot convert to a pointer type" } */ + (void *) uv; /* { dg-error "cannot convert to a pointer type" } */ + (_Bool) sv; /* { dg-error "used struct type value where scalar is required" } */ + (_Bool) uv; /* { dg-error "used union type value where scalar is required" } */ (void) sv; (const void) uv; - (void *) c; /* { dg-warning "warning: cast to pointer from integer of different size" } */ + (void *) c; /* { dg-warning "cast to pointer from integer of different size" } */ (void *) (char) 1; - (char) p; /* { dg-warning "warning: cast from pointer to integer of different size" } */ - (char) (void *) 1; /* { dg-warning "warning: cast from pointer to integer of different size" } */ + (char) p; /* { dg-warning "cast from pointer to integer of different size" } */ + (char) (void *) 1; /* { dg-warning "cast from pointer to integer of different size" } */ } |