Commit 4e37eb44 by Jakub Jelinek Committed by Jakub Jelinek

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
parent 179d2f74
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;
......
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.
......
/* 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" } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment