This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: New ARI warning Tue Feb 11 01:53:11 UTC 2014
- From: Doug Evans <xdje42 at gmail dot com>
- To: brobecker at adacore dot com
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 10 Feb 2014 23:54:28 -0800
- Subject: Re: New ARI warning Tue Feb 11 01:53:11 UTC 2014
- Authentication-results: sourceware.org; auth=none
- References: <20140211015311 dot GA6157 at sourceware dot org>
GDB Administrator <gdbadmin@sourceware.org> writes:
> 265a266,269
>> gdb/guile/guile-internal.h:105: regression: __func__: Do not use __func__, ISO C 90 does not support this macro
> gdb/guile/guile-internal.h:105:#define FUNC_NAME __func__
>> gdb/guile/guile.c:391: gettext: multiple messages: Do not use multiple calls to warning or error, instead use a single call
> gdb/guile/guile.c:391: error (_('));
>> gdb/guile/scm-exception.c:83: code: %p: Do not use printf(%p),
>> instead use printf(%s,paddr()) to dump a target address, or
>> host_address_to_string() for a host address
> gdb/guile/scm-exception.c:83: "%print-exception-message";
>> gdb/guile/scm-exception.c:91: code: %p: Do not use printf(%p),
>> instead use printf(%s,paddr()) to dump a target address, or
>> host_address_to_string() for a host address
> gdb/guile/scm-exception.c:91: "%print-exception-with-stack";
Hi.
I can silence the "multiple messages" warning and the "%p" warnings
with this patch. All the warnings are bogus but I understand
ARI isn't perfect.
Silencing the "multiple messages" warning exceeds 80 columns.
What's the convention for handling this?
Also, regarding the __func__ warning.
I can silence it, but I wonder if now's the time to
require this bit of C99.
[I realize gdb_assert uses some conditional compilation to
only use it if it's available, and I can do that.
But before I do I wanted to check if the community is ready
to move to this part of C99 unconditionally.]
2014-02-10 Doug Evans <xdje42@gmail.com>
* guile/guile.c (guile_repl_command): Silence ARI complaint.
* guile/scm-exception.c (percent_print_exception_message_name): Ditto.
(percent_print_exception_with_stack_name): Ditto.
diff --git a/gdb/guile/guile.c b/gdb/guile/guile.c
index b7134f7..1c4f3bb 100644
--- a/gdb/guile/guile.c
+++ b/gdb/guile/guile.c
@@ -388,7 +388,7 @@ guile_repl_command (char *arg, int from_tty)
arg = skip_spaces (arg);
if (arg && *arg)
error (_("guile-repl currently does not take any arguments."));
- error (_("Guile scripting is not supported in this copy of GDB."));
+ error (_("Guile scripting is not supported in this copy of GDB.")); /* ARI: multiple messages */
}
static void
diff --git a/gdb/guile/scm-exception.c b/gdb/guile/scm-exception.c
index a96a350..2f0a4a7 100644
--- a/gdb/guile/scm-exception.c
+++ b/gdb/guile/scm-exception.c
@@ -80,7 +80,7 @@ static SCM message_symbol;
static SCM full_symbol;
static const char percent_print_exception_message_name[] =
- "%print-exception-message";
+ "%print-exception-message"; /* ARI: %p */
/* Variable containing %print-exception-message.
It is not defined until late in initialization, after our init routine
@@ -88,7 +88,7 @@ static const char percent_print_exception_message_name[] =
static SCM percent_print_exception_message_var = SCM_BOOL_F;
static const char percent_print_exception_with_stack_name[] =
- "%print-exception-with-stack";
+ "%print-exception-with-stack"; /* ARI: %p */
/* Variable containing %print-exception-with-stack.
It is not defined until late in initialization, after our init routine