aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2004-07-18 19:32:10 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2004-07-18 19:32:10 +0000
commit383c9d5d29d8ad4dd934f457ae2777790f0f5a3c (patch)
tree9248ff33edaa4a046a53c4ce5c71a410a937f754 /gcc/cp
parent01847e9d18a6c292916878d7c8d2e32519c3272e (diff)
downloadgcc-383c9d5d29d8ad4dd934f457ae2777790f0f5a3c.zip
gcc-383c9d5d29d8ad4dd934f457ae2777790f0f5a3c.tar.gz
gcc-383c9d5d29d8ad4dd934f457ae2777790f0f5a3c.tar.bz2
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
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/mangle.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 29ef50d..97da2dd 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 97d4309..211c218 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -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: