aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/mangle.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2002-07-02 03:19:22 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2002-07-02 03:19:22 +0000
commit5d69ba1faa7a74aaa44795573aa89ebb834c16d0 (patch)
tree8a402d57cf27037db16d46abdc1f0c6a8166faac /gcc/cp/mangle.c
parent68a830fe3a4d760b2a991c706aa12f4716015ec5 (diff)
downloadgcc-5d69ba1faa7a74aaa44795573aa89ebb834c16d0.zip
gcc-5d69ba1faa7a74aaa44795573aa89ebb834c16d0.tar.gz
gcc-5d69ba1faa7a74aaa44795573aa89ebb834c16d0.tar.bz2
re PR c++/7112 (Regression: ICE on C++ code involving templates and sizeof)
PR c++/7112 * g++.dg/template/sizeof2.C: New test. PR c++/7112 * mangle.c (write_expression): Add mangling for sizeof when applied to a type. * operators.def: Remove stale comment. * cp-demangle.c (demangle_operator_name): Add type_arg parameter. Set it for the "st" operator. (demangle_expression): Handle expressions with types as arguments. From-SVN: r55169
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r--gcc/cp/mangle.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index ae5714a..fc92d6e 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -1834,6 +1834,12 @@ write_expression (expr)
write_mangled_name (expr);
write_char ('E');
}
+ else if (TREE_CODE (expr) == SIZEOF_EXPR
+ && TYPE_P (TREE_OPERAND (expr, 0)))
+ {
+ write_string ("st");
+ write_type (TREE_OPERAND (expr, 0));
+ }
else
{
int i;
@@ -1872,6 +1878,7 @@ write_expression (expr)
write_expression (TREE_OPERAND (expr, 0));
break;
+
/* Handle pointers-to-members specially. */
case SCOPE_REF:
write_type (TREE_OPERAND (expr, 0));