aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/mangle.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2012-03-03 19:55:31 -0500
committerJason Merrill <jason@gcc.gnu.org>2012-03-03 19:55:31 -0500
commit77d4d7c577db67e9c831d4aab154549f8e96fe3b (patch)
tree568dda02d6d59cba304d6ad57b988014e0e7c25e /gcc/cp/mangle.c
parent57910f3a9a81e9ad122a814255197f6f24c6af08 (diff)
downloadgcc-77d4d7c577db67e9c831d4aab154549f8e96fe3b.zip
gcc-77d4d7c577db67e9c831d4aab154549f8e96fe3b.tar.gz
gcc-77d4d7c577db67e9c831d4aab154549f8e96fe3b.tar.bz2
re PR c++/36797 (ICE mangling __is_empty)
PR c++/36797 * mangle.c (write_expression): Improve diagnostic for TRAIT_EXPR. From-SVN: r184874
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r--gcc/cp/mangle.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 34f19ef..04f4344 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -2808,7 +2808,17 @@ write_expression (tree expr)
if (name == NULL)
{
- sorry ("mangling %C", code);
+ switch (code)
+ {
+ case TRAIT_EXPR:
+ error ("use of built-in trait %qE in function signature; "
+ "use library traits instead", expr);
+ break;
+
+ default:
+ sorry ("mangling %C", code);
+ break;
+ }
return;
}
else