aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2009-03-17 21:25:59 +0000
committerRalf Wildenhues <rwild@gcc.gnu.org>2009-03-17 21:25:59 +0000
commit0631b69f9aa1bc1d56a1d26336524aed3ee38e41 (patch)
tree10eadf15b3f22c36e8cf24a1f0e199069fdf4aa2 /gcc/opts.c
parent668112286a4102cfd38e1d4b9c5748337f0a5409 (diff)
downloadgcc-0631b69f9aa1bc1d56a1d26336524aed3ee38e41.zip
gcc-0631b69f9aa1bc1d56a1d26336524aed3ee38e41.tar.gz
gcc-0631b69f9aa1bc1d56a1d26336524aed3ee38e41.tar.bz2
re PR middle-end/37805 (gcc --help=separate)
gcc/ PR middle-end/37805 * opts.c (print_specific_help): In addition to `undocumented', accept `separate' and `joined' flags if passed alone. Describe output by the first matched one of those. (common_handle_option): Skip over empty strings. * gcc.c (display_help): Fix help string for `--help='. * doc/invoke.texi (Option Summary, Overall Options): With `--help=', classes and qualifiers can both be repeated, but only the latter can be negated. One should not pass only negated qualifiers. Fix markup and examples. From-SVN: r144921
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 7788b02..63197709 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1396,7 +1396,7 @@ print_specific_help (unsigned int include_flags,
default:
if (i >= cl_lang_count)
break;
- if ((exclude_flags & ((1U << cl_lang_count) - 1)) != 0)
+ if (exclude_flags & all_langs_mask)
description = _("The following options are specific to just the language ");
else
description = _("The following options are supported by the language ");
@@ -1409,8 +1409,12 @@ print_specific_help (unsigned int include_flags,
{
if (any_flags == 0)
{
- if (include_flags == CL_UNDOCUMENTED)
+ if (include_flags & CL_UNDOCUMENTED)
description = _("The following options are not documented");
+ else if (include_flags & CL_SEPARATE)
+ description = _("The following options take separate arguments");
+ else if (include_flags & CL_JOINED)
+ description = _("The following options take joined arguments");
else
{
internal_error ("unrecognized include_flags 0x%x passed to print_specific_help",
@@ -1539,6 +1543,11 @@ common_handle_option (size_t scode, const char *arg, int value,
len = strlen (a);
else
len = comma - a;
+ if (len == 0)
+ {
+ a = comma + 1;
+ continue;
+ }
/* Check to see if the string matches an option class name. */
for (i = 0, specific_flag = 0; specifics[i].string != NULL; i++)
@@ -1547,7 +1556,7 @@ common_handle_option (size_t scode, const char *arg, int value,
specific_flag = specifics[i].flag;
break;
}
-
+
/* Check to see if the string matches a language name.
Note - we rely upon the alpha-sorted nature of the entries in
the lang_names array, specifically that shorter names appear