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] Fix ARI violations in c++compile


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

commit 5c889512f325e0447a6182f70cfa7e1d9e407167
Author: Keith Seitz <keiths@redhat.com>
Date:   Thu Aug 30 09:26:47 2018 -0700

    Fix ARI violations in c++compile
    
    This patch fixes two violations of the ARI (use of ATTRIBUTE_UNUSED and
    "%ll").
    
    gdb/ChangeLog
    
    	* compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
    	pulongest instead of "%lld".
    	* compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
    	ATTRIBUTE_UNUSED.

Diff:
---
 gdb/ChangeLog                       | 7 +++++++
 gdb/compile/compile-cplus-symbols.c | 2 +-
 gdb/compile/compile-cplus-types.c   | 4 ++--
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 83348d5..128c0e8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2018-09-01  Keith Seitz  <keiths@redhat.com>
+
+	* compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
+	pulongest instead of "%lld".
+	* compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
+	ATTRIBUTE_UNUSED.
+
 2018-08-31  Tom Tromey  <tom@tromey.com>
 
 	* dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplus-symbols.c
index 0f849fe..234b977 100644
--- a/gdb/compile/compile-cplus-symbols.c
+++ b/gdb/compile/compile-cplus-symbols.c
@@ -335,7 +335,7 @@ convert_symbol_bmsym (compile_cplus_instance *instance,
 void
 gcc_cplus_convert_symbol (void *datum,
 			  struct gcc_cp_context *gcc_context,
-			  enum gcc_cp_oracle_request request ATTRIBUTE_UNUSED,
+			  enum gcc_cp_oracle_request request,
 			  const char *identifier)
 {
   if (compile_debug)
diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c
index 7fc4136..271cc66 100644
--- a/gdb/compile/compile-cplus-types.c
+++ b/gdb/compile/compile-cplus-types.c
@@ -1244,9 +1244,9 @@ compile_cplus_instance::gcc_cplus_leave_scope
    gcc_decl.  */
 
 static void
-compile_cplus_debug_output_1 (gcc_type arg)
+compile_cplus_debug_output_1 (ULONGEST arg)
 {
-  fprintf_unfiltered (gdb_stdlog, "%lld", arg);
+  fprintf_unfiltered (gdb_stdlog, "%s", pulongest (arg));
 }
 
 static void


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