This is the mail archive of the
mailing list for the GCC project.
Re: tests for --help
* Joseph S. Myers wrote on Fri, Apr 10, 2009 at 09:02:42AM CEST:
> On Fri, 10 Apr 2009, Ralf Wildenhues wrote:
> > -check_for_options c "--help=undocumented" "This switch lacks documentation" "" ""
> > +# Do not check for "This switch lacks documentation" here, because
> > +# ENABLE_CHECKING may turn that off.
> > +check_for_options c "--help=undocumented" "" "" ""
> I think the actual bug is that this observable behavior depends on
> --enable-checking; the "This switch lacks documentation" should be used
> unconditionally, rather than depending on how the compiler was configured.
That was added as part of
2008-02-19 Nick Clifton <email@example.com>
* opts.c (undocumented_msg): Leave blank unless checking is
and the discussion in <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31349>
leaves me wondering whether the result was a good consensus.
I personally find "This switch lacks documentation" ugly, too, but I
assume GCC developers don't read --help output anyway, and it has the
advantages that users might be more likely to report a bug, and not
assume that a switch without documentation in --help is a no-op.
Here's the alternative patch I'm testing right now.
2009-04-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* opts.c (undocumented_msg): Do not leave blank even with
--- gcc/opts.c (Revision 145850)
+++ gcc/opts.c (Arbeitskopie)
@@ -338,11 +338,7 @@
struct visibility_flags visibility_options;
/* What to print when a switch has no documentation. */
static const char undocumented_msg = N_("This switch lacks documentation");
-static const char undocumented_msg = "";
/* Used for bookkeeping on whether user set these flags so
-fprofile-use/-fprofile-generate does not use them. */