@@ -388,6 +388,10 @@ Options:\n\
fprintf (stream, _("\
--version print assembler version number and exit\n"));
fprintf (stream, _("\
+ --info don't suppress infos\n"));
+ fprintf (stream, _("\
+ --no-info suppress information messages\n"));
+ fprintf (stream, _("\
--warn don't suppress warnings\n"));
fprintf (stream, _("\
-W, --no-warn suppress warnings\n"));
@@ -519,7 +523,9 @@ parse_args (int * pargc, char *** pargv)
OPTION_NO_PAD_SECTIONS,
OPTION_MULTIBYTE_HANDLING, /* = STD_BASE + 40 */
OPTION_SFRAME,
- OPTION_SCFI
+ OPTION_SCFI,
+ OPTION_INFO,
+ OPTION_NOINFO
/* When you add options here, check that they do
not collide with OPTION_MD_BASE. See as.h. */
};
@@ -595,6 +601,7 @@ parse_args (int * pargc, char *** pargv)
,{"mri", no_argument, NULL, 'M'}
,{"nocpp", no_argument, NULL, OPTION_NOCPP}
,{"no-pad-sections", no_argument, NULL, OPTION_NO_PAD_SECTIONS}
+ ,{"no-info", no_argument, NULL, OPTION_NOINFO}
,{"no-warn", no_argument, NULL, 'W'}
,{"reduce-memory-overheads", no_argument, NULL, OPTION_REDUCE_MEMORY_OVERHEADS}
,{"statistics", no_argument, NULL, OPTION_STATISTICS}
@@ -603,6 +610,7 @@ parse_args (int * pargc, char *** pargv)
,{"verbose", no_argument, NULL, OPTION_VERBOSE}
,{"target-help", no_argument, NULL, OPTION_TARGET_HELP}
,{"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT}
+ ,{"info", no_argument, NULL, OPTION_INFO}
,{"warn", no_argument, NULL, OPTION_WARN}
,{"multibyte-handling", required_argument, NULL, OPTION_MULTIBYTE_HANDLING}
};
@@ -968,6 +976,14 @@ This program has absolutely no warranty.\n"));
flag_readonly_data_in_text = 1;
break;
+ case OPTION_INFO:
+ flag_no_infos = 0;
+ break;
+
+ case OPTION_NOINFO:
+ flag_no_infos = 1;
+ break;
+
case OPTION_WARN:
flag_no_warnings = 0;
flag_fatal_warnings = 0;
@@ -314,6 +314,9 @@ COMMON bool flag_macro_alternate;
section? */
COMMON unsigned char flag_readonly_data_in_text; /* -R */
+/* True if infos should be inhibited. */
+COMMON int flag_no_infos; /* --no-info */
+
/* True if warnings should be inhibited. */
COMMON int flag_no_warnings; /* -W, --no-warn */
@@ -260,6 +260,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
[@b{--size-check=[error|warning]}]
[@b{--statistics}]
[@b{-v}] [@b{-version}] [@b{--version}]
+ [@b{--info}] [@b{--no-info}]
[@b{--warn}] [@b{-W}] [@b{--no-warn}] [@b{--fatal-warnings}]
[@b{-w}] [@b{-x}]
[@b{-Z}] [@b{@@@var{FILE}}]
@@ -980,6 +981,12 @@ Print the @command{as} version.
@item --version
Print the @command{as} version and exit.
+@item --info
+Don't suppress info messages.
+
+@item --no-info
+Suppress info messages.
+
@item --warn
Don't suppress warning messages or treat them as errors.
@@ -2464,6 +2471,7 @@ assembler.)
* statistics:: --statistics to see statistics about assembly
* traditional-format:: --traditional-format for compatible output
* v:: -v to announce version
+* info:: --info, --no-info to control info messages
* W:: --warn, -W, --no-warn, --fatal-warnings to control warnings
* Z:: -Z to make object file even after errors
@end menu
@@ -2863,6 +2871,31 @@ You can find out what version of as is running by including the
option @samp{-v} (which you can also spell as @samp{-version}) on the
command line.
+@node info
+@section Control Information Messages: @option{--info}, @option{--no-info}
+
+In some cases, @command{@value{AS}} might give an additional information message
+associated to a context that generated a warning or error message when assembling.
+The information message provides additional details about an earlier diagnostic message, usually in the
+form of some context (such as when the earlier diagnostic was within a macro).
+All such informations are directed to the standard error file.
+This flag only affects the information messages, it does not change any particular
+of how @command{@value{AS}} assembles your file.
+
+@kindex --info
+@cindex diagnostic informations, switching on (default behavior)
+The option @option{--info} is enabled by default, and enables printing of additional
+diagnostic informations.
+
+@kindex --no-info
+@cindex diagnostic informations, switching off
+You can switch the option @option{--info} off by specifying @option{--no-info},
+which disables printing of additional information in the context of an earlier
+diagnostic.
+
+Specifying @option{--info} after @option{--no-info} will turn on again printing
+of additional diagnostic informations.
+
@node W
@section Control Warnings: @option{--warn}, @option{-W}, @option{--no-warn}, @option{--fatal-warnings}
@@ -141,11 +141,14 @@ as_info_where (const char *file, unsigned int line, unsigned int indent,
va_list args;
char buffer[2000];
- va_start (args, format);
- vsnprintf (buffer, sizeof (buffer), format, args);
- va_end (args);
- fprintf (stderr, "%s:%u: %*s%s%s\n",
- file, line, (int)indent, "", _("Info: "), buffer);
+ if (!flag_no_infos)
+ {
+ va_start (args, format);
+ vsnprintf (buffer, sizeof (buffer), format, args);
+ va_end (args);
+ fprintf (stderr, "%s:%u: %*s%s%s\n",
+ file, line, (int)indent, "", _("Info: "), buffer);
+ }
}
/* Send to stderr a string as a warning, and locate warning