public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Patch: RFA: remove FILE_TYPE
@ 2005-03-28 21:10 Tom Tromey
  2005-03-30 20:06 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Tromey @ 2005-03-28 21:10 UTC (permalink / raw)
  To: Gcc Patch List

FILE_TYPE has long appeared to be unused in GCC, and according to
this post:

    http://gcc.gnu.org/ml/gcc-patches/2004-07/msg01063.html

... even gpc does not use it.

This patch removes FILE_TYPE from GCC.

Bootstrapped and tested on x86 FC2.
I didn't build Ada, but I think the one Ada change is obviously
correct and unobjectionable -- it just removes a 'case FILE_TYPE'
from a "we don't handle this" block.

Ok for trunk?

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* tree.def (FILE_TYPE): Removed.
	* typeclass.h (enum type_class): Removed file_type_class.
	* dwarf2out.c (is_base_type): Updated.
	(gen_type_die): Likewise.
	* dbxout.c (dbxout_type): Updated.
	* builtins.c (type_to_class): Updated.
	* tree.c (type_contains_placeholder_1): Updated.
	* config/sparc/sparc.c (sparc_type_code): Updated.
	* config/ia64/ia64.c (hfa_element_mode): Updated.
	* expr.c (count_type_elements): Updated.
	* stor-layout.c (layout_type): Updated.
	* tree-inline.c (remap_type): Updated.
	* tree-pretty-print.c (dump_generic_node): Updated.

Index: ada/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* decl.c (gnat_substitute_in_type): Don't handle FILE_TYPE.

Index: builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.447
diff -u -r1.447 builtins.c
--- builtins.c 24 Mar 2005 06:22:37 -0000 1.447
+++ builtins.c 28 Mar 2005 17:50:51 -0000
@@ -1482,7 +1482,6 @@
     case QUAL_UNION_TYPE:  return union_type_class;
     case ARRAY_TYPE:	   return (TYPE_STRING_FLAG (type)
 				   ? string_type_class : array_type_class);
-    case FILE_TYPE:	   return file_type_class;
     case LANG_TYPE:	   return lang_type_class;
     default:		   return no_type_class;
     }
Index: dbxout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dbxout.c,v
retrieving revision 1.222
diff -u -r1.222 dbxout.c
--- dbxout.c 22 Mar 2005 23:18:42 -0000 1.222
+++ dbxout.c 28 Mar 2005 17:50:51 -0000
@@ -1932,11 +1932,6 @@
 	stabstr_S ("eFalse:0,True:1,;");
       break;
 
-    case FILE_TYPE:
-      stabstr_C ('d');
-      dbxout_type (TREE_TYPE (type), 0);
-      break;
-
     case COMPLEX_TYPE:
       /* Differs from the REAL_TYPE by its new data type number.
 	 R3 is NF_COMPLEX.  We don't try to use any of the other NF_*
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.574
diff -u -r1.574 dwarf2out.c
--- dwarf2out.c 22 Mar 2005 23:18:42 -0000 1.574
+++ dwarf2out.c 28 Mar 2005 17:50:55 -0000
@@ -8016,7 +8016,6 @@
     case METHOD_TYPE:
     case POINTER_TYPE:
     case REFERENCE_TYPE:
-    case FILE_TYPE:
     case OFFSET_TYPE:
     case LANG_TYPE:
     case VECTOR_TYPE:
@@ -12110,12 +12109,6 @@
       gen_ptr_to_mbr_type_die (type, context_die);
       break;
 
-    case FILE_TYPE:
-      gen_type_die (TREE_TYPE (type), context_die);
-      /* No way to represent these in Dwarf yet!  */
-      gcc_unreachable ();
-      break;
-
     case FUNCTION_TYPE:
       /* Force out return type (in case it wasn't forced out already).  */
       gen_type_die (TREE_TYPE (type), context_die);
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.782
diff -u -r1.782 expr.c
--- expr.c 11 Mar 2005 22:58:49 -0000 1.782
+++ expr.c 28 Mar 2005 17:50:58 -0000
@@ -4522,7 +4522,6 @@
 
     case VOID_TYPE:
     case METHOD_TYPE:
-    case FILE_TYPE:
     case FUNCTION_TYPE:
     case LANG_TYPE:
     default:
Index: stor-layout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/stor-layout.c,v
retrieving revision 1.227
diff -u -r1.227 stor-layout.c
--- stor-layout.c 8 Mar 2005 16:20:35 -0000 1.227
+++ stor-layout.c 28 Mar 2005 17:50:59 -0000
@@ -1759,14 +1759,6 @@
       }
       break;
 
-    case FILE_TYPE:
-      /* The size may vary in different languages, so the language front end
-	 should fill in the size.  */
-      TYPE_ALIGN (type) = BIGGEST_ALIGNMENT;
-      TYPE_USER_ALIGN (type) = 0;
-      TYPE_MODE  (type) = BLKmode;
-      break;
-
     default:
       gcc_unreachable ();
     }
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.173
diff -u -r1.173 tree-inline.c
--- tree-inline.c 22 Mar 2005 20:53:23 -0000 1.173
+++ tree-inline.c 28 Mar 2005 17:50:59 -0000
@@ -321,7 +321,6 @@
       walk_tree (&TYPE_FIELDS (new), copy_body_r, id, NULL);
       break;
 
-    case FILE_TYPE:
     case OFFSET_TYPE:
     default:
       /* Shouldn't have been thought variable sized.  */
Index: tree-pretty-print.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-pretty-print.c,v
retrieving revision 2.52
diff -u -r2.52 tree-pretty-print.c
--- tree-pretty-print.c 9 Dec 2004 10:54:36 -0000 2.52
+++ tree-pretty-print.c 28 Mar 2005 17:51:00 -0000
@@ -1,5 +1,5 @@
 /* Pretty formatting of GENERIC trees in C syntax.
-   Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    Adapted from c-pretty-print.c by Diego Novillo <dnovillo@redhat.com>
 
 This file is part of GCC.
@@ -441,10 +441,6 @@
       pp_string (buffer, "::");
       break;
 
-    case FILE_TYPE:
-      NIY;
-      break;
-
     case ARRAY_TYPE:
       {
 	tree tmp;
Index: tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.c,v
retrieving revision 1.471
diff -u -r1.471 tree.c
--- tree.c 25 Mar 2005 19:24:11 -0000 1.471
+++ tree.c 28 Mar 2005 17:51:02 -0000
@@ -1908,7 +1908,6 @@
     case OFFSET_TYPE:
     case REFERENCE_TYPE:
     case METHOD_TYPE:
-    case FILE_TYPE:
     case FUNCTION_TYPE:
     case VECTOR_TYPE:
       return false;
Index: tree.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.def,v
retrieving revision 1.113
diff -u -r1.113 tree.def
--- tree.def 8 Mar 2005 13:57:01 -0000 1.113
+++ tree.def 28 Mar 2005 17:51:04 -0000
@@ -254,9 +254,6 @@
    includes the hidden argument for "self".  */
 DEFTREECODE (METHOD_TYPE, "method_type", tcc_type, 0)
 
-/* Used for Pascal; details not determined right now.  */
-DEFTREECODE (FILE_TYPE, "file_type", tcc_type, 0)
-
 /* This is a language-specific kind of type.
    Its meaning is defined by the language front end.
    layout_type does not know how to lay this out,
Index: typeclass.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/typeclass.h,v
retrieving revision 1.5
diff -u -r1.5 typeclass.h
--- typeclass.h 9 Dec 2004 10:54:38 -0000 1.5
+++ typeclass.h 28 Mar 2005 17:51:04 -0000
@@ -1,5 +1,5 @@
 /* Type class enum
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -39,7 +39,7 @@
   real_type_class, complex_type_class,
   function_type_class, method_type_class,
   record_type_class, union_type_class,
-  array_type_class, string_type_class, file_type_class,
+  array_type_class, string_type_class,
   lang_type_class
 };
 
Index: ada/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/decl.c,v
retrieving revision 1.67
diff -u -r1.67 decl.c
--- ada/decl.c 18 Mar 2005 11:47:17 -0000 1.67
+++ ada/decl.c 28 Mar 2005 17:51:12 -0000
@@ -6403,7 +6403,6 @@
 
     case OFFSET_TYPE:
     case METHOD_TYPE:
-    case FILE_TYPE:
     case FUNCTION_TYPE:
     case LANG_TYPE:
       /* Don't know how to do these yet.  */
Index: config/ia64/ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
retrieving revision 1.350
diff -u -r1.350 ia64.c
--- config/ia64/ia64.c 17 Mar 2005 17:35:16 -0000 1.350
+++ config/ia64/ia64.c 28 Mar 2005 17:51:15 -0000
@@ -3348,7 +3348,7 @@
     case VOID_TYPE:	case INTEGER_TYPE:	case ENUMERAL_TYPE:
     case BOOLEAN_TYPE:	case CHAR_TYPE:		case POINTER_TYPE:
     case OFFSET_TYPE:	case REFERENCE_TYPE:	case METHOD_TYPE:
-    case FILE_TYPE:	case LANG_TYPE:		case FUNCTION_TYPE:
+    case LANG_TYPE:		case FUNCTION_TYPE:
       return VOIDmode;
 
       /* Fortran complex types are supposed to be HFAs, so we need to handle
Index: config/sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.355
diff -u -r1.355 sparc.c
--- config/sparc/sparc.c 13 Mar 2005 22:11:46 -0000 1.355
+++ config/sparc/sparc.c 28 Mar 2005 17:51:17 -0000
@@ -7727,7 +7727,6 @@
 	case VECTOR_TYPE:
 	case CHAR_TYPE:		/* GNU Pascal CHAR type.  Not used in C.  */
 	case BOOLEAN_TYPE:	/* GNU Fortran BOOLEAN type.  */
-	case FILE_TYPE:		/* GNU Pascal FILE type.  */
 	case LANG_TYPE:		/* ? */
 	  return qualifiers;
   

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Patch: RFA: remove FILE_TYPE
  2005-03-28 21:10 Patch: RFA: remove FILE_TYPE Tom Tromey
@ 2005-03-30 20:06 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2005-03-30 20:06 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Gcc Patch List

On Mon, Mar 28, 2005 at 01:13:13PM -0700, Tom Tromey wrote:
> 	* tree.def (FILE_TYPE): Removed.
> 	* typeclass.h (enum type_class): Removed file_type_class.
> 	* dwarf2out.c (is_base_type): Updated.
> 	(gen_type_die): Likewise.
> 	* dbxout.c (dbxout_type): Updated.
> 	* builtins.c (type_to_class): Updated.
> 	* tree.c (type_contains_placeholder_1): Updated.
> 	* config/sparc/sparc.c (sparc_type_code): Updated.
> 	* config/ia64/ia64.c (hfa_element_mode): Updated.
> 	* expr.c (count_type_elements): Updated.
> 	* stor-layout.c (layout_type): Updated.
> 	* tree-inline.c (remap_type): Updated.
> 	* tree-pretty-print.c (dump_generic_node): Updated.
> 
> Index: ada/ChangeLog
> from  Tom Tromey  <tromey@redhat.com>
> 
> 	* decl.c (gnat_substitute_in_type): Don't handle FILE_TYPE.

Ok.


r~

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-30 20:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-28 21:10 Patch: RFA: remove FILE_TYPE Tom Tromey
2005-03-30 20:06 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).