aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2009-01-23 17:46:21 +0000
committerNathan Sidwell <nathan@codesourcery.com>2009-01-23 17:46:21 +0000
commit278df34e1203e781f97b32320094e1831f5f9624 (patch)
tree029b7fdd1b46d8351a5dfb570dc23d6c41c69154 /gas
parent3b2935444fe89c883ffe7964b69556f3580ee1ef (diff)
downloadgdb-278df34e1203e781f97b32320094e1831f5f9624.zip
gdb-278df34e1203e781f97b32320094e1831f5f9624.tar.gz
gdb-278df34e1203e781f97b32320094e1831f5f9624.tar.bz2
* doc/c-arm.texi (): Document -mwarn-deprecated.
* config/tc-arm.c (WARN_DEPRECATED): Remove. Replace with ... (warn_on_deprecated): ... this. (opcode_lookup, md_assemble): Check it before warning. (arm_opts): Add m[no-]warn-deprecated. (md_parse_option): Replace WARN_DEPRECATED with warn_on_deprecated.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog10
-rw-r--r--gas/config/tc-arm.c29
-rw-r--r--gas/doc/c-arm.texi6
3 files changed, 31 insertions, 14 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 9b0ade4..c3894ba 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,13 @@
+2009-01-23 Nathan Sidwell <nathan@codesourcery.com>
+
+ * doc/c-arm.texi (): Document -mwarn-deprecated.
+ * config/tc-arm.c (WARN_DEPRECATED): Remove. Replace with ...
+ (warn_on_deprecated): ... this.
+ (opcode_lookup, md_assemble): Check it before warning.
+ (arm_opts): Add m[no-]warn-deprecated.
+ (md_parse_option): Replace WARN_DEPRECATED with
+ warn_on_deprecated.
+
2009-01-23 Andreas Schwab <schwab@suse.de>
* config/tc-mips.c (macro) [M_DINS, M_SEQ_I, M_SNE_I]: Cast
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index cf7d74b..0cefbdb 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -42,8 +42,6 @@
#include "dwarf2dbg.h"
-#define WARN_DEPRECATED 1
-
#ifdef OBJ_ELF
/* Must be at least the size of the largest unwind opcode (currently two). */
#define ARM_OPCODE_CHUNK_SIZE 8
@@ -144,6 +142,9 @@ static int support_interwork = FALSE;
static int uses_apcs_float = FALSE;
static int pic_code = FALSE;
static int fix_v4bx = FALSE;
+/* Warn on using deprecated features. */
+static int warn_on_deprecated = TRUE;
+
/* Variables that we set while parsing command-line options. Once all
options have been read we re-process these values to set the real
@@ -14162,7 +14163,7 @@ opcode_lookup (char **str)
return opcode;
}
- if (unified_syntax)
+ if (warn_on_deprecated && unified_syntax)
as_warn (_("conditional infixes are deprecated in unified syntax"));
affix = base + (opcode->tag - OT_odd_infix_0);
cond = hash_find_n (arm_cond_hsh, affix, 2);
@@ -14246,7 +14247,7 @@ opcode_lookup (char **str)
|| opcode->tag == OT_cinfix3_legacy))
{
/* step CM */
- if (unified_syntax
+ if (warn_on_deprecated && unified_syntax
&& (opcode->tag == OT_cinfix3
|| opcode->tag == OT_cinfix3_deprecated))
as_warn (_("conditional infixes are deprecated in unified syntax"));
@@ -14287,7 +14288,7 @@ md_assemble (char *str)
return;
}
- if (opcode->tag == OT_cinfix3_deprecated)
+ if (warn_on_deprecated && opcode->tag == OT_cinfix3_deprecated)
as_warn (_("s suffix on comparison instruction is deprecated"));
/* The value which unconditional instructions should have in place of the
@@ -19902,6 +19903,8 @@ md_begin (void)
-mthumb Start in Thumb mode
-mthumb-interwork Code supports ARM/Thumb interworking
+ -m[no-]warn-deprecated Warn about deprecated features
+
For now we will also provide support for:
-mapcs-32 32-bit Program counter
@@ -19999,6 +20002,10 @@ struct arm_option_table arm_opts[] =
/* These are recognized by the assembler, but have no affect on code. */
{"mapcs-frame", N_("use frame pointer"), NULL, 0, NULL},
{"mapcs-stack-check", N_("use stack size checking"), NULL, 0, NULL},
+
+ {"mwarn-deprecated", NULL, &warn_on_deprecated, 1, NULL},
+ {"mno-warn-deprecated", N_("do not warn on use of deprecated feature"),
+ &warn_on_deprecated, 0, NULL},
{NULL, NULL, NULL, 0, NULL}
};
@@ -20610,12 +20617,10 @@ md_parse_option (int c, char * arg)
&& ((arg == NULL && opt->option[1] == 0)
|| streq (arg, opt->option + 1)))
{
-#if WARN_DEPRECATED
/* If the option is deprecated, tell the user. */
- if (opt->deprecated != NULL)
+ if (warn_on_deprecated && opt->deprecated != NULL)
as_tsktsk (_("option `-%c%s' is deprecated: %s"), c,
arg ? arg : "", _(opt->deprecated));
-#endif
if (opt->var != NULL)
*opt->var = opt->value;
@@ -20630,12 +20635,10 @@ md_parse_option (int c, char * arg)
&& ((arg == NULL && fopt->option[1] == 0)
|| streq (arg, fopt->option + 1)))
{
-#if WARN_DEPRECATED
/* If the option is deprecated, tell the user. */
- if (fopt->deprecated != NULL)
+ if (warn_on_deprecated && fopt->deprecated != NULL)
as_tsktsk (_("option `-%c%s' is deprecated: %s"), c,
arg ? arg : "", _(fopt->deprecated));
-#endif
if (fopt->var != NULL)
*fopt->var = &fopt->value;
@@ -20652,12 +20655,10 @@ md_parse_option (int c, char * arg)
&& strncmp (arg, lopt->option + 1,
strlen (lopt->option + 1)) == 0)
{
-#if WARN_DEPRECATED
/* If the option is deprecated, tell the user. */
- if (lopt->deprecated != NULL)
+ if (warn_on_deprecated && lopt->deprecated != NULL)
as_tsktsk (_("option `-%c%s' is deprecated: %s"), c, arg,
_(lopt->deprecated));
-#endif
/* Call the sup-option parser. */
return lopt->func (arg + strlen (lopt->option) - 1);
diff --git a/gas/doc/c-arm.texi b/gas/doc/c-arm.texi
index 8b48c28..91c50b7 100644
--- a/gas/doc/c-arm.texi
+++ b/gas/doc/c-arm.texi
@@ -291,6 +291,12 @@ as position-independent code (PIC).
Allow @code{BX} instructions in ARMv4 code. This is intended for use with
the linker option of the same name.
+@cindex @code{-mwarn-deprecated} command line option, ARM
+@item -mwarn-deprecated
+@itemx -mno-warn-deprecated
+Enable or disable warnings about using deprecated options or
+features. The default is to warn.
+
@end table