re PR c/35442 (Completely broken diagnostic with view_convert_expr)
PR c/35442 * c-pretty-print.c (pp_c_cast_expression, pp_c_expression): Handle VIEW_CONVERT_EXPR the same as CASE_CONVERT. * gcc.dg/pr35442.c: New test. From-SVN: r142558
This commit is contained in:
parent
179d2f74d4
commit
4e37eb44ce
@ -1,3 +1,9 @@
|
||||
2008-12-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/35442
|
||||
* c-pretty-print.c (pp_c_cast_expression, pp_c_expression): Handle
|
||||
VIEW_CONVERT_EXPR the same as CASE_CONVERT.
|
||||
|
||||
2008-12-08 Richard Henderson <rth@redhat.com>
|
||||
|
||||
PR 38240
|
||||
|
@ -1629,6 +1629,7 @@ pp_c_cast_expression (c_pretty_printer *pp, tree e)
|
||||
case FLOAT_EXPR:
|
||||
case FIX_TRUNC_EXPR:
|
||||
CASE_CONVERT:
|
||||
case VIEW_CONVERT_EXPR:
|
||||
pp_c_type_cast (pp, TREE_TYPE (e));
|
||||
pp_c_cast_expression (pp, TREE_OPERAND (e, 0));
|
||||
break;
|
||||
@ -2020,6 +2021,7 @@ pp_c_expression (c_pretty_printer *pp, tree e)
|
||||
case FLOAT_EXPR:
|
||||
case FIX_TRUNC_EXPR:
|
||||
CASE_CONVERT:
|
||||
case VIEW_CONVERT_EXPR:
|
||||
pp_c_cast_expression (pp, e);
|
||||
break;
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2008-12-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/35442
|
||||
* gcc.dg/pr35442.c: New test.
|
||||
|
||||
2008-12-07 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/string_comparison.adb: New test.
|
||||
|
11
gcc/testsuite/gcc.dg/pr35442.c
Normal file
11
gcc/testsuite/gcc.dg/pr35442.c
Normal file
@ -0,0 +1,11 @@
|
||||
/* PR c/35442 */
|
||||
/* { dg-bogus "not supported by" "" { target *-*-* } 0 } */
|
||||
|
||||
typedef char A __attribute__ ((vector_size (64)));
|
||||
typedef int B __attribute__ ((vector_size (64)));
|
||||
|
||||
void
|
||||
foo (A a)
|
||||
{
|
||||
((B) a) (); /* { dg-error "is not a function" } */
|
||||
}
|
Loading…
Reference in New Issue
Block a user