This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB 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]

[binutils-gdb] compile: Rename struct type_map_instance::gcc_type field


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e3bdafe2bac1672da335fde734b337c5504e5437

commit e3bdafe2bac1672da335fde734b337c5504e5437
Author: Pedro Alves <palves@redhat.com>
Date:   Thu Oct 29 12:55:01 2015 +0000

    compile: Rename struct type_map_instance::gcc_type field
    
    Fixes:
    
      src/gdb/compile/compile-c-types.c:36:12: error: declaration of â??gcc_type type_map_instance::gcc_typeâ?? [-fpermissive]
         gcc_type gcc_type;
    	      ^
      In file included from src/gdb/../include/gcc-c-interface.h:23:0,
    		   from src/gdb/compile/compile-internal.h:21,
    		   from src/gdb/compile/compile-c-types.c:23:
      src/gdb/../include/gcc-interface.h:32:28: error: changes meaning of â??gcc_typeâ?? from â??typedef long long unsigned int gcc_typeâ?? [-fpermissive]
       typedef unsigned long long gcc_type;
    			      ^
      src/gdb/compile/compile-c-types.c: In function â??gcc_type convert_qualified(compile_c_instance*, type*)â??:
      src/gdb/compile/compile-c-types.c:310:19: error: invalid conversion from â??intâ?? to â??gcc_qualifiersâ?? [-fpermissive]
    		quals);
    		     ^
    
    gdb/ChangeLog:
    2015-10-29  Pedro Alves  <palves@redhat.com>
    
    	* compile/compile-c-types.c (struct type_map_instance)
    	<gcc_type>: Rename to gcc_type_handle.
    	(insert_type, convert_type): Adjust.

Diff:
---
 gdb/ChangeLog                 | 6 ++++++
 gdb/compile/compile-c-types.c | 8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 27712b3..0bb06ae 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2015-10-29  Pedro Alves  <palves@redhat.com>
 
+	* compile/compile-c-types.c (struct type_map_instance)
+	<gcc_type>: Rename to gcc_type_handle.
+	(insert_type, convert_type): Adjust.
+
+2015-10-29  Pedro Alves  <palves@redhat.com>
+
 	* dwarf2-frame-tailcall.c (dwarf2_tailcall_sniffer_first): Don't
 	assume that "break" breaks out of a TRY/CATCH.
 	* python/py-framefilter.c (py_print_single_arg): Don't assume
diff --git a/gdb/compile/compile-c-types.c b/gdb/compile/compile-c-types.c
index 60f9bd4..ccc9167 100644
--- a/gdb/compile/compile-c-types.c
+++ b/gdb/compile/compile-c-types.c
@@ -31,7 +31,7 @@ struct type_map_instance
 
   /* The corresponding gcc type handle.  */
 
-  gcc_type gcc_type;
+  gcc_type gcc_type_handle;
 };
 
 /* Hash a type_map_instance.  */
@@ -72,13 +72,13 @@ insert_type (struct compile_c_instance *context, struct type *type,
   void **slot;
 
   inst.type = type;
-  inst.gcc_type = gcc_type;
+  inst.gcc_type_handle = gcc_type;
   slot = htab_find_slot (context->type_map, &inst, INSERT);
 
   add = (struct type_map_instance *) *slot;
   /* The type might have already been inserted in order to handle
      recursive types.  */
-  if (add != NULL && add->gcc_type != gcc_type)
+  if (add != NULL && add->gcc_type_handle != gcc_type)
     error (_("Unexpected type id from GCC, check you use recent enough GCC."));
 
   if (add == NULL)
@@ -388,7 +388,7 @@ convert_type (struct compile_c_instance *context, struct type *type)
   inst.type = type;
   found = (struct type_map_instance *) htab_find (context->type_map, &inst);
   if (found != NULL)
-    return found->gcc_type;
+    return found->gcc_type_handle;
 
   result = convert_type_basic (context, type);
   insert_type (context, type, result);


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