This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 ();
  	    }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]