This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
C++ PATCH for c++/11756
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 03 Oct 2007 15:00:37 -1000
- Subject: C++ PATCH for c++/11756
This patch just changes an ICE on use of typeof in templates to a sorry
which suggests using decltype instead. I don't think we need to make
typeof work in templates when there's a standardized alternative.
Tested x86_64-pc-linux-gnu, applied to trunk.
2007-10-03 Jason Merrill <jason@redhat.com>
PR c++/11756
* mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
Index: mangle.c
===================================================================
*** mangle.c (revision 128889)
--- mangle.c (working copy)
*************** write_type (tree type)
*** 1687,1692 ****
--- 1687,1696 ----
write_char ('E');
break;
+ case TYPEOF_TYPE:
+ sorry ("mangling typeof, use decltype instead");
+ break;
+
default:
gcc_unreachable ();
}