Patchwork [c++,ada,middle-end] : PR 38662 - __fastcall confuses a function's throw() specification

login
register
mail settings
Submitter Eric Botcazou
Date Dec. 31, 2010, 6:20 p.m.
Message ID <201012311920.25995.ebotcazou@adacore.com>
Download mbox | patch
Permalink /patch/77095/
State New
Headers show

Comments

Eric Botcazou - Dec. 31, 2010, 6:20 p.m.
> Good, I remove this part of the patch. I wasn't quite sure if there
> would be some use of METHOD_TYPE. As by grepping through ada's gcc
> tree I found some hits for it.

Indeed, removed thusly, thanks for pointing this out.


2010-12-31  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (substitute_in_type): Do not deal with
	LANG_TYPE, METHOD_TYPE or OFFSET_TYPE.
	* gcc-interface/utils.c (handle_vector_size_attribute): Do not deal
	with METHOD_TYPE or OFFSET_TYPE.

Patch

Index: gcc-interface/utils.c
===================================================================
--- gcc-interface/utils.c	(revision 168068)
+++ gcc-interface/utils.c	(working copy)
@@ -5313,9 +5313,7 @@  handle_vector_size_attribute (tree *node
 
   while (POINTER_TYPE_P (type)
 	 || TREE_CODE (type) == FUNCTION_TYPE
-	 || TREE_CODE (type) == METHOD_TYPE
-	 || TREE_CODE (type) == ARRAY_TYPE
-	 || TREE_CODE (type) == OFFSET_TYPE)
+	 || TREE_CODE (type) == ARRAY_TYPE)
     type = TREE_TYPE (type);
 
   /* Get the mode of the type being modified.  */
Index: gcc-interface/decl.c
===================================================================
--- gcc-interface/decl.c	(revision 168068)
+++ gcc-interface/decl.c	(working copy)
@@ -8638,10 +8638,7 @@  substitute_in_type (tree t, tree f, tree
 
       return build_complex_type (nt);
 
-    case OFFSET_TYPE:
-    case METHOD_TYPE:
     case FUNCTION_TYPE:
-    case LANG_TYPE:
       /* These should never show up here.  */
       gcc_unreachable ();