diff options
author | Jason Merrill <jason@redhat.com> | 2008-12-21 16:01:48 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2008-12-21 16:01:48 -0500 |
commit | 3feb128fadfe1f496dd5d59116221e07fe019e27 (patch) | |
tree | 452b7f06a7e2bab59e876c65d66faf1091f632ee /gcc/cp | |
parent | aad9c4f437c243137f532b7b63e9aeef0821a0e2 (diff) | |
download | gcc-3feb128fadfe1f496dd5d59116221e07fe019e27.zip gcc-3feb128fadfe1f496dd5d59116221e07fe019e27.tar.gz gcc-3feb128fadfe1f496dd5d59116221e07fe019e27.tar.bz2 |
re PR c++/38597 ([c++0x] ICE when auto return type function given as argument to function template)
PR c++/38597
* name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE.
From-SVN: r142868
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/mangle.c | 8 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 1 |
3 files changed, 10 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 19af86c..94e1a7c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2008-12-21 Jason Merrill <jason@redhat.com> + + PR c++/38597 + * name-lookup.c (arg_assoc_type): Handle DECLTYPE_TYPE. + 2008-12-20 Jakub Jelinek <jakub@redhat.com> Manuel López-Ibáñez <manu@gcc.gnu.org> diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 1ec27c1..a7b4662 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -2348,12 +2348,12 @@ write_expression (tree expr) case CAST_EXPR: write_type (TREE_TYPE (expr)); + /* There is no way to mangle a zero-operand cast like + "T()". */ if (!TREE_OPERAND (expr, 0)) - /* "T()" is mangled as "T(void)". */ - write_char ('v'); + sorry ("zero-operand casts cannot be mangled due to a defect " + "in the C++ ABI"); else if (list_length (TREE_OPERAND (expr, 0)) > 1) - /* FIXME the above hack for T() needs to be replaced with - something more general. */ sorry ("mangling function-style cast with more than one argument"); else write_expression (TREE_VALUE (TREE_OPERAND (expr, 0))); diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index b5d14b3..4c06afda 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -4701,6 +4701,7 @@ arg_assoc_type (struct arg_lookup *k, tree type) case VECTOR_TYPE: case BOOLEAN_TYPE: case FIXED_POINT_TYPE: + case DECLTYPE_TYPE: return false; case RECORD_TYPE: if (TYPE_PTRMEMFUNC_P (type)) |