This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[PATCH] Fix gcc -v --help (PR middle-end/37576)


Hi!

The recently added CL_SAVE is actually a flag, not a whole new kind of
option, at least for --help purposes.  The options will have CL_TARGET
set too usually and should be IMHO printed under target specific options in
that case, rather than "options usable in target attribute".
CL_MIN_OPTION_CLASS is used in two places, in this place we IMHO don't
want to include CL_SAVE in there, but in the other place (assert that
there are fewer languages than log2(CL_SAVE)) it needs to be CL_SAVE.

Ok for trunk?

2008-09-19  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/37576
	* opts.c (common_handle_option): Don't call print_specific_help with
	CL_SAVE as first argument.

--- gcc/opts.c.jj	2008-09-15 09:36:26.000000000 +0200
+++ gcc/opts.c	2008-09-19 13:29:07.000000000 +0200
@@ -1462,7 +1462,8 @@ common_handle_option (size_t scode, cons
 	print_specific_help (0, undoc_mask, all_langs_mask);
 	/* Then display any remaining, non-language options.  */
 	for (i = CL_MIN_OPTION_CLASS; i <= CL_MAX_OPTION_CLASS; i <<= 1)
-	  print_specific_help (i, undoc_mask, 0);
+	  if (i != CL_SAVE)
+	    print_specific_help (i, undoc_mask, 0);
 	exit_after_options = true;
 	break;
       }

	Jakub


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