mangle.c (write_expression): Issue a sorry for zero-operand functional casts.

* mangle.c (write_expression): Issue a sorry for zero-operand
	functional casts.

From-SVN: r84899
This commit is contained in:
Mark Mitchell 2004-07-18 19:32:10 +00:00 committed by Mark Mitchell
parent 01847e9d18
commit 383c9d5d29
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-07-18 Mark Mitchell <mark@codesourcery.com>
* mangle.c (write_expression): Issue a sorry for zero-operand
functional casts.
2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13092

View File

@ -2056,7 +2056,13 @@ write_expression (tree expr)
case CAST_EXPR:
write_type (TREE_TYPE (expr));
write_expression (TREE_VALUE (TREE_OPERAND (expr, 0)));
/* There is no way to mangle a zero-operand cast like
"T()". */
if (!TREE_OPERAND (expr, 0))
sorry ("zero-operand casts cannot be mangled due to a defect "
"in the C++ ABI");
else
write_expression (TREE_VALUE (TREE_OPERAND (expr, 0)));
break;
case STATIC_CAST_EXPR: